- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Short question:
Is it possible to get a dynamic list of all model states?
Usercase:
I would like to be able to choose between model states when placing a part or assembly file in an assembly.
My solution as it is now is this:
a user parameter, pState, which is a multivalue parameter with all the model state names.
a Form with a radio box, showing pState, This is shown when placing component in an assembly.
a rule containing only:
ThisDoc.ActiveModelState = pState
All is fine and dandy until I or a collegue make a new model state, or renames an existing.
EDIT: Just now it stopped working when I try placing the component in an assembly. It works fine when I'm in the file, though. Gotta try and find what I broke...
Now I have to update the user parameter list to correspond with the list of model states. This I want to automate.
Is it possible to extract a list of all model states to update pState:
MultiValue.SetList("pState", "All", "Different", "Model", "States", "...")
Am I making sense? Is there an better solution to obtain this?
PS: I have a rule containg
pState = ThisDoc.ActiveModelState
which triggers if someone changes model state from the model state list, just to keep functionality.
Solved! Go to Solution.