Message 1 of 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Wanting iLogic rule that will clear off all model states except the current active one aka the Master.
Understand there is this syntax:
ModelState.Delete()
But can not seem to get this to work...
Heres what I have:
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 oMStates = oPCD.ModelStates Component.ActiveModelState("COURSE 1 STEEL TANK SHEET:8") = "Master" For Each STATE In oMStates MessageBox.Show(STATE.Name) If STATE.Name = "Model State1" ' Delete Model State End If Next iLogicVb.UpdateWhenDone() = True
Any help would be great, thanks.
Solved! Go to Solution.