Message 1 of 9
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have an assembly with 2 model states. The first will be dynamically controlled through iLogic. The second will be static. Despite a few different attempts. I cannot make changes to the first without affecting the second. In my rule, I first include a statement to set the model state as well as setting the member edit scope:
Dim oModelState As ModelState ThisAssembly.Document.ComponentDefinition.ModelStates.MemberEditScope = MemberEditScopeEnum.kEditActiveMember For Each oModelState In ThisAssembly.Document.ComponentDefinition.ModelStates If oModelState.Name = "[Primary]" Then oModelState.Activate() End If Next
Next, for my dynamic model state, I set the suppression of each part with this type of thing:
If somthing = something Then
Component.IsActive("...") = False
Else
Component.IsActive("...") = True
End If
Next, for the static model state, I switch model states as follows:
For Each oModelState In ThisAssembly.Document.ComponentDefinition.ModelStates If oModelState.Name = "Posts" Then oModelState.Activate() End If Next
And finally, set the suppression state of the appropriate parts in a similar way as seen above.
The rule runs as though kEditAllMembers is set. Is there something I'm missing? Thanks
Solved! Go to Solution.