Message 1 of 6
Rule doesn't update the model
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I made a rule which changes a flange according to selected type and sub type using Case function.
The issue is that when I change the type model doesn't update fully unless I change the subtype also.
Below is the code:
MultiValue.SetValueOptions(True, DefaultIndex := 0) Select Case Flange_Group Case "A" MultiValue.SetList("Flange_type", "A1", "A2", "A3") Feature.IsActive("Corner Hole 1") = True Feature.IsActive("Corner Hole 2") = True Feature.IsActive("Corner Holes mirror") = True Select Case Flange_type Case "A1" Width = 250 Height = 500 Flange_thk = 75 hole_nr_vert = 7 hole_nr_hrz = 5 Case "A2" Width = 350 Height = 500 Flange_thk = 75 hole_nr_vert = 9 hole_nr_hrz = 5 Case "A3" Width = 400 Height = 500 Flange_thk = 75 hole_nr_vert = 11 hole_nr_hrz = 5 End Select Case "B" MultiValue.SetList("Flange_type", "B1", "B2", "B3") Feature.IsActive("Corner Hole 1") = False Feature.IsActive("Corner Hole 2") = False Feature.IsActive("Corner Holes mirror") = False Select Case Flange_type Case "B1" Width = 150 Height = 250 Flange_thk = 50 hole_nr_vert = 3 hole_nr_hrz = 3 Case "B2" Width = 150 Height = 350 Flange_thk = 50 hole_nr_vert = 3 hole_nr_hrz = 5 Case "B3" Width = 150 Height = 400 Flange_thk = 50 hole_nr_vert = 3 hole_nr_hrz = 7 End Select Case "C" MultiValue.SetList("Flange_type", "C1", "C2", "C3") Feature.IsActive("Corner Hole 1") = False Feature.IsActive("Corner Hole 2") = False Feature.IsActive("Corner Holes mirror") = False Select Case Flange_type Case "C1" Width = 300 Height = 300 Flange_thk = 20 hole_nr_vert = 4 hole_nr_hrz = 4 Case "C2" Width = 400 Height = 400 Flange_thk = 20 hole_nr_vert = 6 hole_nr_hrz = 6 Case "C3" Width = 500 Height = 500 Flange_thk = 20 hole_nr_vert = 8 hole_nr_hrz = 8 End Select End Select
Moving the subtype below the main Select case which defines the sub types doesn't change the result.
Setup A
Setup B after I change to it
Actual Setup B after I switch to B2 and back to B1