ignoring selections

ignoring selections

NachoShaw
Advisor Advisor
291 Views
3 Replies
Message 1 of 4

ignoring selections

NachoShaw
Advisor
Advisor

Hi

 

i am doing selecions using the clsSelect class. is it possible to ignore selections based on certain criteria? the criteria is an iProperty. if the iProperty value is "InValid", do not select. It would be even better if it couldnt even highlight as i mouseover

 

 

 

thanks

 

Nigel

Nacho
Automation & Design Engineer

Inventor automation Programmer (C#, VB.Net / iLogic)
Furniture, Sheet Metal, Structural, Metal fab, Tradeshow, Fabrication, CNC

EESignature


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.


0 Likes
292 Views
3 Replies
Replies (3)
Message 2 of 4

YuhanZhang
Autodesk
Autodesk

I think what you want to do is to ignore the pre-select/select some type of objects. You can do this as below:

 

1. To not pre-select some object, setting the DoHighlight to False in the OnPreselect event when you determine the object is being pre-selected.

2. To not select some object, in the OnSelect event you can use SelectEvents.RemoveFromSelectedEntities(JustSelectedEntities(1)) to remove the object from the select set(if multiple objects in the JustSelectedEntities you may need to iterate and check each of them).

 

And if you just want to pre-select/select some certain object, you can use the SelectEvents.AddSelectionFilter to specify that only some certain type of object can be selected.

 

Hope this helps.



If this solves the problem please click ACCEPT SOLUTION so other people can find it easily.



Rocky Zhang
Inventor API PD
Manufacturing Solutions
Autodesk, Inc.

0 Likes
Message 3 of 4

NachoShaw
Advisor
Advisor
Hi

The objects that I am selecting are assembly leaf occurrences. Everything is a leaf occurrence in the assembly. If the object does NOT have an attribute, I would like it not to highlight when I mouse over it. Reason:

I have many objects (panels) with many smaller objects inserted into holes in the larger objects. They are inserted / constrained together and sit with the faces being flush. There is a gap around the smaller inserted object of .2 mm. When I go to select the smaller objects only, I keep selecting the larger objects. I need to ignore the larger objects completely if I can and only allow highlighting, selection of the smaller objects which all have the same attribute. The larger objects do not have any attributes.....



Thanks

Nigel

Nacho
Automation & Design Engineer

Inventor automation Programmer (C#, VB.Net / iLogic)
Furniture, Sheet Metal, Structural, Metal fab, Tradeshow, Fabrication, CNC

EESignature


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.


0 Likes
Message 4 of 4

YuhanZhang
Autodesk
Autodesk

So what you need to do is in the OnPreSelect/OnSelect events to check if the leaf occcurrence is what you need before you highlight/select it.



If this solves the problem please click ACCEPT SOLUTION so other people can find it easily.



Rocky Zhang
Inventor API PD
Manufacturing Solutions
Autodesk, Inc.

0 Likes