Message 1 of 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I'm running into a couple of issues with the code shown below. Specifically within the "ModelStateUpdate" section.
Within my part (Box) I have a Model_State1 and a Model_State2 model states. They have a feature labeled "Cut". What I'm trying to do is suppress/unsuppress this feature within both model states from the assembly level. But for some reason it updates one but not the second.
Additionally, I don't like that the api converts my INCH parameter to MM when using param.Value. Is there a way to avoid this conversion? This is lower priority.
Sub ModelStateUpdate(oDef, oMS, oName) Dim userparams As UserParameters = oDef.Parameters.UserParameters For Each param In userparams MsgBox(oName & " | " & param.Name & " : " & param.Value) Next For Each oFeat As PartFeature In oDef.Features If oFeat.Name.Contains("Cut") Then ' oFeat.Suppressed = False oFeat.Suppressed = True MsgBox(oName & " : " & oFeat.Name) End If Next
End Sub
Solved! Go to Solution.