Change selection mode in assembly via API

Change selection mode in assembly via API

jan.pomplun
Contributor Contributor
520 Views
4 Replies
Message 1 of 5

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
Accepted solutions (1)
521 Views
4 Replies
Replies (4)
Message 2 of 5

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
Message 3 of 5

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
Message 4 of 5

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
Message 5 of 5

jan.pomplun
Contributor
Contributor

Thanks!!

 

As always, once you know it, it seems quite obvious 🙂

 

Inventor.SelectionPriorityEnum.kPartSelectionPriority

 

did it.

0 Likes