Programmatically select a PartsListRow to highlight geometry

Programmatically select a PartsListRow to highlight geometry

projeto2SGY8C
Participant Participant
220 Views
1 Reply
Message 1 of 2

Programmatically select a PartsListRow to highlight geometry

projeto2SGY8C
Participant
Participant

Hello everyone,

I am developing an Add-in for my company and I am facing a performance issue regarding selection in the Drawing environment.

The Goal: I need to programmatically select a specific item (row) in the Parts List. My intention is to replicate the manual behavior: when a user clicks on a row in the Parts List, Inventor automatically highlights/selects the corresponding component on the sheet. This manual behavior meets my needs perfectly.

The Problem: Currently, I am trying to achieve this highlighting by iterating through DrawingCurves and adding them to the SelectSet. However, this approach is causing significant performance lags (freezing) because some of our parts have a very large number of curves.

The Question: Is there a way to directly select the PartsListRow object via the API (adding the row itself to the SelectSet) so that Inventor handles the geometry highlighting natively, avoiding the need to iterate through curves?

I have searched for a method to "Select" the row item but haven't found a working solution yet.

Any suggestions or code snippets would be greatly appreciated.

Thank you!



projeto2SGY8C_0-1768832971186.png

 

0 Likes
221 Views
1 Reply
Reply (1)
Message 2 of 2

jnowel
Collaborator
Collaborator

I'm just throwing an idea that may be an alternative.

How about you select the components via browser nodes instead?
Manually, you'll be clicking the components in the browser tree and the component edges in the drawing views will be highlighted.

I noticed though that the highlight color is different
Red when clicking the partslist row

 

jnowel_0-1768922599366.png

Green when selecting via browser nodes

jnowel_1-1768922663000.png

Below link might help with regards the browser nodes
Solved: Drawing Tree Nodes - DoPreSelect not highlighting components Blue in View - Autodesk Communi...