Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Change selection mode in assembly via API

jan.pomplun
Contributor

Change selection mode in assembly via API

jan.pomplun
Contributor
Contributor

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

0 Likes
Reply
Accepted solutions (1)
469 Views
4 Replies
Replies (4)

rikard.nilsson
Collaborator
Collaborator

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

 

0 Likes

jan.pomplun
Contributor
Contributor

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

 

0 Likes

rikard.nilsson
Collaborator
Collaborator
Accepted solution

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

 

 

0 Likes

jan.pomplun
Contributor
Contributor

Thanks!!

 

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

 

Inventor.SelectionPriorityEnum.kPartSelectionPriority

 

did it.

0 Likes