- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi @J_Dumont. There is no vb.net equivalent of that iLogic 'ModelStatesGlobalScope' resource. When we want a change to be applied to all ModelStates the same way, we either iterate through each of the ModelStates, activate them, then make the same change, or we make the change to each row in the ModelStateTable, or to each row in the ModelStates Excel worksheet. Working with the ModelStateTable is not too difficult, but nearly everything in it is ReadOnly, except for the data cell values.
Correction: If we can access the ModelStates collection of that component, then we can control its MemberEditScope property value, which can then be set to 'kEditAllMembers' (a variation of the https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=MemberEditScopeEnum). Then we can make the change just once, and it will effect all ModelStates of that file. But you must start from the 'factory' document version of that file. One shortcut way to do that from an assembly perspective, is to use the 'Open' method, specify the true FullDocumentName (not just FullFileName) of that component, and capture the Document that this method returns, then use that to access the ModelStates, and further interactions / edits to that document. The document you get back from that Open method will effectively always be the 'factory', due to the way you are opening it with that method.
Wesley Crihfield
(Not an Autodesk Employee)