10-29-2021
01:57 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
10-29-2021
01:57 AM
Got the following to work:
Dim doc As AssemblyDocument = ThisDoc.Document oName = "COURSE 1 STEEL TANK SHEET:8" occ = doc.ComponentDefinition.Occurrences.ItemByName(oName) Dim facDoc As PartDocument = occ.Definition.Document oPCD = facDoc.ComponentDefinition If oPCD.IsModelStateMember Then facDoc = oPCD.FactoryDocument End If oMStates = oPCD.ModelStates newModelStateName = "N1" oMState = oMStates.Add(newModelStateName) oMState.Activate() occ.ActiveModelState = newModelStateName oMState.FactoryDocument.ComponentDefinition.Features.Item("MWAY900 Centre").Suppressed = False oMState.FactoryDocument.ComponentDefinition.Features.Item("MWAY900 Holes").Suppressed = False oMState.FactoryDocument.ComponentDefinition.Features.Item("MWAY900 PCD").Suppressed = False
This does require shifting the ManwayCutOut code into this top level rule, which I can do. It is a workable solution.
However it certainly seems to be the long way to do it, the ilogicvb.runrule trigger should work. I will report this as a possible bug.
Thank you for all of your help, finally have a workable solution! ![]()