Hi,
Just wondering if there's a better way to access, for instance, the material of specific model states after they're changed but before save, that doesn't require activating each individually, which I assume is probably pretty intensive.
What I've found is that the model state's `.Document.ActiveMaterial` doesn't update until after save, but activating the model state and accessing the parent document's `.ActiveMaterial` does. But it seems like this would imply it's stored elsewhere, which might make it possible to avoid switching model states at all.
Thanks
Hi @meGVGMF. If you want to set different materials to different ModelStates, then the only way to do that is by 'activating' each ModelState before making the change, so that the change will be recorded by that ModelState. The alternative might be to edit the ModelStatesTable directly, because that contains the settings of all ModelStates in the document. You may be able to use Document.Update instead of Document.Save to induce the internal update too, but that may take a similar amount of time to saving it.
Wesley Crihfield
(Not an Autodesk Employee)
Can't find what you're looking for? Ask the community or share your knowledge.