Basic workflow with forms/ilogic and Model states sub assemblies and part parameters

Basic workflow with forms/ilogic and Model states sub assemblies and part parameters

jerez.diseno
Explorer Explorer
269 Views
1 Reply
Message 1 of 2

Basic workflow with forms/ilogic and Model states sub assemblies and part parameters

jerez.diseno
Explorer
Explorer

 

Hello people, i made this diagram to be straightforward with the issue, hope you enjoy it, and you can re use it if you like.

 

 

im not gonna state the problem, im gonna state what i need.

 

 

I have this assembly, (it has model states ) it has a couple of sub assemblies (that have model states), that at the same tame have sub sub assemblies(model states) in them, i also have parts (not yet model stated because of my issue).

 

im trying to drive the constrains of the sub assemblies , and the paramters of the parts within them, with very simple ilogic (just + and  = statements) 

 

What is the best practice/workflow to access these parameters in ilogic/forms? how to access them properly?

(just =  and + or - statements, its just controlling its parameter, in different, or across all model states.)

 

currently, if i try to change a parameter,  sometimes it works (in that particular top assembly model state,) but other parameters fail ( in other model state, maybe the parameter is in a supressed constrain etc..)

 

just getting started with model states, because i need to get some variations on my assemblies and model states fit perfectly in my workflow, as long as i tame it.

 

thank you!

 

 

Artboard 1-100.jpg

0 Likes
270 Views
1 Reply
Reply (1)
Message 2 of 2

dalton98
Collaborator
Collaborator

Hello. Model states can be quite confusing and I'm still learning how to use them. The two main things ive learned...

 

1. You may have noticed that you cant change the model state of components within sub-assemblies. I interpreted this as needing to create a model state for every possible combination for the sub-assembly. Take the second sub-assembly from your diagram for example, that sub-assembly would need to have as many model states as the one part within it in order to change it from the main assembly. However, the ilogic snippet for changing model states doesnt enforce that as long as the model state you want to change isn't inside of another model state . It does change the file of the affected sub-assembly so you will need to mindful of that and/or create a copy of the file every time you change it.

 

Here is an example of how you would change the model state for the part within the second sub-assembly:

Component.ActiveModelState(MakePath("sub-assembly2:1", "part2:1")) = "Model State1"

 

2. Changing the parameters of a model state is not as easy. The only two ways to do this is by either accessing the model state excel file of the document, or you manually change to the desired model state and then change the parameter value. There is no work around programmatically that doesn't follow one of these steps. I would recommend not needing to change the parameters of model states often/ at all.

 

Hopefully this helps.

0 Likes