Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
jan.pomplun
467 Views, 4 Replies

Change selection mode in assembly via API

I would like to know if it is possible to change the selection behaviour

 

https://knowledge.autodesk.com/support/inventor-products/learn-explore/caas/CloudHelp/cloudhelp/2014...

 

in an assembly via the API?

 

Thanks

Hi,

 

 

The link did not work but I think you should search in API Help for "SelectionFilterEnum Enumerator"

There you can finnd all the different filters that you need for selection..

 

/Rikard

 

Dear Rikard,

 

thanks for the quick answer. However, for my problem I do not want to set a selection filter when choosing parts via tha API (e.g. via Pick).

I would like to change the "global" selection mode in an inventor assembly to "Parts" via the API. The following pic shows the corresponding menu (sorry, its German) in the inventor GUI. Using EventWatcher, I tried to find if this command fires some event, but no luck.

 

partSelection.png

 

So, can these menu entries be activated via the API?

 

Thanks,

 

Jan

 

OK..

 

I haven't done this but I think this is what you are looking for,,

 

SelectionPriorityEnum Enumerator

 

to use in 

 

AssemblyDocument.SelectionPriority Property

 

 

/Rikard

 

 

Thanks!!

 

As always, once you know it, it seems quite obvious :slightly_smiling_face:

 

Inventor.SelectionPriorityEnum.kPartSelectionPriority

 

did it.