Message 1 of 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm trying to create a simple rule that will update a standard tolerances box on a drawing depending on the selection of FINE, MEDIUM, COARSE, VERY COARSE.
This works fine until I changed it to an external rule to keep it with all our other iLogic rules. The default value is set to " " and this is supposed to trigger a form on opening or saving the drawing until it is changed to one of the other options. If I open the form manually and change the parameter it works fine. I feel like it needs to check the parameter before the if statement but not sure how this would normally be done? Is there a better way to do this?
If TolSelect = " " Then iLogicForm.Show("Machining Tolerance Selection", FormMode.Modal) iProperties.Value("Custom", "Tol1") = "XX" iProperties.Value("Custom", "Tol2") = "XX" iProperties.Value("Custom", "Tol3") = "XX" iProperties.Value("Custom", "Tol4") = "XX" iProperties.Value("Custom", "Tol5") = "XX" iProperties.Value("Custom", "Tol6") = "XX" iProperties.Value("Custom", "Tol7") = "XX" iProperties.Value("Custom", "Tol8") = "XX" iProperties.Value("Custom", "TolSelect") = "SELECT TOLERANCE" ElseIf TolSelect = "4. VERY COARSE" Then iProperties.Value("Custom", "Tol1") = "-" iProperties.Value("Custom", "Tol2") = 0.5 iProperties.Value("Custom", "Tol3") = 1 iProperties.Value("Custom", "Tol4") = 1.5 iProperties.Value("Custom", "Tol5") = 2.5 iProperties.Value("Custom", "Tol6") = 4 iProperties.Value("Custom", "Tol7") = 6 iProperties.Value("Custom", "Tol8") = 8 iProperties.Value("Custom", "TolSelect") = "VERY COARSE" ElseIf TolSelect = "3. COARSE" Then iProperties.Value("Custom", "Tol1") = 0.2 iProperties.Value("Custom", "Tol2") = 0.3 iProperties.Value("Custom", "Tol3") = 0.5 iProperties.Value("Custom", "Tol4") = 0.8 iProperties.Value("Custom", "Tol5") = 1.2 iProperties.Value("Custom", "Tol6") = 2 iProperties.Value("Custom", "Tol7") = 3 iProperties.Value("Custom", "Tol8") = 4 iProperties.Value("Custom", "TolSelect") = "COARSE" ElseIf TolSelect = "2. MEDIUM" Then iProperties.Value("Custom", "Tol1") = 0.1 iProperties.Value("Custom", "Tol2") = 0.1 iProperties.Value("Custom", "Tol3") = 0.2 iProperties.Value("Custom", "Tol4") = 0.3 iProperties.Value("Custom", "Tol5") = 0.5 iProperties.Value("Custom", "Tol6") = 0.8 iProperties.Value("Custom", "Tol7") = 1.2 iProperties.Value("Custom", "Tol8") = 2 iProperties.Value("Custom", "TolSelect") = "MEDIUM" ElseIf TolSelect = "1. FINE" Then iProperties.Value("Custom", "Tol1") = 0.05 iProperties.Value("Custom", "Tol2") = 0.05 iProperties.Value("Custom", "Tol3") = 0.1 iProperties.Value("Custom", "Tol4") = 0.15 iProperties.Value("Custom", "Tol5") = 0.2 iProperties.Value("Custom", "Tol6") = 0.3 iProperties.Value("Custom", "Tol7") = 0.5 iProperties.Value("Custom", "Tol8") = "-" iProperties.Value("Custom", "TolSelect") = "FINE" End If
Solved! Go to Solution.