Message 1 of 5
How to perform an action on multiple parts as a single action/call, instead of separate actions/calls
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
When I have to do an action on multiple parts in an assembly via API, let's say suppressing a component, what I now do is something like this:
For Each oOcc in oComp.Occurrences
If oOcc.Name = "Something" Then
oOcc.Suppress
Else
oOcc.Unsuppress
End If
Next
But when I would do this manually in Inventor, I would just select all the required occurrences and the Right click and choose Suppress.
Now it performs the Suppress action on all occurrences at once, instead of suppressing one, then the next etc.
The performance of the 'batch' action is a lot faster.
Is there a way to do a 'batch' action from the API?
I know it should also be possible to select all required occurrences, and then use the commandmanager to execute, but it seems a bit like a work around and for some commands, the actual command requires some input/prompts.
Thanks in advance.