Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
zoe.baker-bushby
4912 Views, 20 Replies

Create Model States using iLogic

I have an assembly that has a duplication of the same part. 

The part has only the master model state, but I want to be able to add model states to this part via ilogic.

 

This line creates model states at the assembly level (which I don't need).

oModelState = oDoc.ComponentDefinition.ModelStates.Add(oName)
		oDoc.ActiveModelState = oName

 

This is what I am trying to do... vaguely...

Dim oDoc As AssemblyDocument
	
Dim oOcc As ComponentOccurrence 	
For Each oOcc In Occurrences
'The below line does not work, what is the correct syntax????
oOcc.ComponentDefinition.ModelStates.Add(oName)
next

 

Any help/advice would be great?

 

Labels (3)