how to get thickness of elements as a list?

Seçkin13
Seçkin13 Altair Community Member
edited October 2020 in Community Q&A

Hi all

 

I would like to get a list of thickness for selected elements.

 

I wrote these codes but it gives just one thickness as a result. 

 

Could you please help me ?

 

*createmark elements 1 179 79 150 279 35 ... 
set test [hm_getthickness elements 1]
foreach elements $test {
 puts '$test'
 
 }

Tagged:

Answers

  • Koushik Chandrashekhar_21806
    edited January 2020

    Hi,

     

    Do you want to know the range of thickness in your model? If so, Visualize the model by thickness as shown in the image below.

    by thickness.PNG

    By doing so, you will get to see a range of thickness as shown below.

     

    thicknesses.PNG

     

    If you want to individually check element thickness, then click on F10 and pick an element.

     

    Or, do you want to get a list of thickness in some csv format or in a notepad?

     

  • Q.Nguyen-Dai
    Q.Nguyen-Dai Altair Community Member
    edited January 2020

    Hi all

     

    I would like to get a list of thickness for selected elements.

     

    I wrote these codes but it gives just one thickness as a result. 

     

    Could you please help me ?

     

    *createmark elements 1 179 79 150 279 35 ... 
    set test [hm_getthickness elements 1]
    foreach elements $test {
     puts '$test'
     
     }

     

    No thickness information within element dataname.

    You have to look for the property of element.

     

  • llyle_20499
    llyle_20499 New Altair Community Member
    edited January 2020

    Hi Seckin,

     

    You should use the api like this:

     

    foreach n_elemID [list 179 79 150 279] {

           puts '$n_elemID  : [hm_getthickness elements $n_elemID]'

    }

  • Q.Nguyen-Dai
    Q.Nguyen-Dai Altair Community Member
    edited January 2020

    Hi Seckin,

     

    You should use the api like this:

     

    foreach n_elemID [list 179 79 150 279] {

           puts '$n_elemID  : [hm_getthickness elements $n_elemID]'

    }

     

    If element thickness was assigned via component, not directly by element, this command returns nothing. In this case you have to call 'hm_getthickness component'