Most Efficient Way to Select Elements with Multiple Selection Criteria
Hello,
Hoping someone can help me find the most efficient way to select elements with multiple selection criteria -
i.e. I want to select all of the elements within a specific component, then further refine the selection to only select the quad4 elements.
I don't think hm_createmark can take multiple arguments, but if it could, an ideal solution would look something like:
hm_createmark elements 1 "by config" "quad4" "by comp" ID#...etc
I'm getting by with this, but this is rather slow for large models and seems limited in the number of conditions:
hm_createmark elements 1 "by config" "quad4"
hm_createmark elements 2 "by comp" $comp
*markintersection elements 1 elements 2
Thanks in advance!
Answers
-
Hey Ryan,
*markintersection has to go over all entities in both marks to get the common ones. I can see how this might take a long time if for the first mark you're getting all quad4 elements in the model and comparing only to all the elements in one component.
Here's my suggestion: create a list with all the elements in a given component. So you'd use "hm_createmark comps" then "hm_getmark elems".
Using a foreach loop, check for every element if that's a quad4 or not. If it is, append it to an empty list. This way you only need to go over the elements in the component of interest.
Kind Regards,
Paulo Libório.0