Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Create Model State Within a Part File

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
a81383
319 Views, 2 Replies

Create Model State Within a Part File

This one is really giving me trouble. I've noticed that there's solutions on the forums for creating new model states in an .ipt from an assembly level. But is there a way to turn a normal part file (.ipt) into a model state and add new model states all from within the .ipt?

 

Thank you for your time!

2 REPLIES 2
Message 2 of 3
yan.gauthier
in reply to: a81383

Hi,

 

you can just add a new model state from within the part:

 

Sub newModelState()

Dim partDoc As PartDocument
Set partDoc = ThisApplication.ActiveEditDocument

Dim newModelState As ModelState
Set newModelState = partDoc.ComponentDefinition.ModelStates.add("newModelState")

End Sub
Message 3 of 3
a81383
in reply to: yan.gauthier

Thank you, thank you!! That works great!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report