Select all elements in a Part assembly by TCL

Joachim_B
Joachim_B Altair Community Member

Hello.

I would select all elements in a part assembly to rotate it around a axis with a TCL script.
Currently a part of my script already works. I find all the parts and parts assembly in my highest part assembly with the following code.

set parts [hm_getvalue parts name="Joker Fluegel li Version1" dataname=childrenids]

To rotate the elements is also working with the following code.

*createmark elems 1 "by id" 1-100
*createplane 1 0 1 0 640 1120.41 710.132
*rotatemark modules 1 1 -90

My problem is currently to mark all the elements that are in the part assembly. Can you help me with the code to select all the elements from the parts.

Thank you.

Tagged:

Answers

  • Hello @Joachim_B,

    Part is not just a container. As it enables AI (look at Match or Classify features), it stores transformation matrix. If you rotate only the elements, the transformation matrix of the parts will not be updated which may cause issues downstream if you do representation management or anything else with parts. 

    We would recommend rotating the parts themselves. Rotate elements should only be if a subsection of the elements in a single part need moving (like modelling a portion of a symmetric part and rotating the elements to complete the meshing of that single part more easily), not to rotate the whole assembly.

    Hope that helps,

    Michael