Cancel
Showing results for 
Search instead for 
Did you mean: 

How to select elements using nodes through API

Valued Contributor
Valued Contributor

Hello, everybody!

 

I needed to add to a set, elements that use nodes that were contained in another set (do the same that the command "Group/Elements/Using Nodes..."). How can I do this through API?

 

Best regards,

 

Fabiano.

1 REPLY

Re: How to select elements using nodes through API

Phenom
Phenom

Hi,

 If nSet is your nodes, elSet your elements: 

elSet.AddSetRule(nSet.ID,FGD_ELEM_BYNODE)

 

All info regarding the concept of rules can be found in the Set chapter of the API help.

Checkout 4.6.2.5 AddSetRule, 4.6.2.6 AddRule and 4.6.2.7 Group Sleection Rules

 

AP