Jump to content
Sign in to follow this  

IDs of attached elements

Recommended Posts

Hey guys,


maybe one of you can help me completing the following task:


I need to know the IDs of the attached elements of elements. From a topology optimization I selected the elements:


#Querry Elements
set set_id [myModel AddSelectionSet element]
myModel GetSelectionSetHandle elem_set $set_id
elem_set Add "contour >= $isoValue"
myQuery SetSelectionSet $set_id
myQuery SetQuery "element.id element.centroid contour.value element.connectivity"
myQuery WriteData $outPath/ElemsCentroid.txt

This gets me a list with ELEMENT ID, CENTROID coordinates, and the nodes associated with the element.

One way of solving my issue is to get a Node ID Element ID list. in order to find the attached elements. I really  cannot find the script to do this, as there is no node.connectivity query option.


Thanks in advance and best regards,


Share this post

Link to post
Share on other sites

Hi Merula,


You can get the ID's of attached elements using the *findmark command. Here's a little test script I wrote as an example:

# Create element set for test run
*createmarkpanel elems 1 "Select Elements"
set elemsOriginal [ hm_getmark elems 1 ];
*clearmark elems 1

# Find attached elements 
hm_createmark elems 1 "by id" "$elemsOriginal"
*findmark elements 1 1 1 elements 0 2
set elemsAttached [ hm_getmark elems 2 ];
*clearmark elems 1
*clearmark elems 2

puts "The attached elements are $elemsAttached"


Rahul Ponginan likes this

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.

Sign in to follow this  

  • Create New...