Jump to content

How to get nodes order from element id using TCL

Recommended Posts



The following problem (written in black) has been resolved, I'm wondering how to get nodes order from element id using TCL.

If you have any trick to do that, I'm interested ! ;)


I have a problem about my HyperMesh macro.
I would like to get the material orientation of an element but I don't find any information about this.
The only thing that I found is reviewing the orientation but as fast as you leave the menu, the "vector" disappears and you can't use it.

 Do you have any ideas to help me ?

Moreover, I wondered how to get some information in an external file. Is there any functions to do that ?

Thanks in advance.



Share this post

Link to post
Share on other sites

Thanks for your help !


However, with this function, you need the attribute_index of the element, but I don't know which index match with wich attribute. I'm trying to find out this information.

I'll also take a look to your link about reading external information, thank you. ;)


Edit: With the index 3, it seems to return the angle orientation. Now, I'm just wondering how this angle is defined exactly in HyperMesh.

Edit2: It's the angle between x_elem and x_mat. But I need x_elem vector to know the x_mat ! I am wondering now how to get node1/node2 of the element (defining x_elem) with TCL. We can access to the information thanks to Card Edit in HyperMesh but it seems that I can't extract their ID. :/
Edit3: Problem solved, got their IDs. :)

Share this post

Link to post
Share on other sites


are you using optistruct solver?

if so, please refer to attribs defined in feoutput template

you will find "THETA" and corresponding attribute name

you will use attribute name instead of attribute index, because sometimes the index changed (i don't know why)

then you can get the material direction by

hm_getentityvalue elems $ELEMID {attribute-name} 0 -byid


there are many attribs defined in template, so to find exact the name, you should open card editor of elems, looking for the text that describe material angle

then search that text in output template, usually attribute name is not same as the text in card editor

Share this post

Link to post
Share on other sites


Thanks for your help !

But as my third edit said, I solved the problem using :


hm_getentityvalue element $element_id node1.id 0

hm_getentityvalue element $element_id node2.id 0


Thanks again !

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

You are posting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...