ETtype and Element config mismatch

Altair Forum User
Altair Forum User
Altair Employee
edited October 2020 in Community Q&A

Hi all,

User profile : Ansys

I need to find the components which has ettype and element config mismatch through code.

is there any way.

In this as per now I got the ettype 'Solid 95' of sensor.

I don't know how to compare .

Can u plz hlp.

 

Thanks,

mahes

Answers

  • tinh
    tinh Altair Community Member
    edited September 2017

    Hi,

    how can you get ettype of a component?

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited September 2017

    Hi,

    how can you get ettype of a component?

    hi tinh,

    @tinh

    yeah..the elements in that comp should have it ryt.

    for example tria -> SHELL63 .

    Is there a way for this. 

     

     

    Thanks,

    Mahes
     

  • tinh
    tinh Altair Community Member
    edited September 2017

    ehh, Mahes. I am asking you...

    but i found it, try:

     foreach CompId $CompListToCheck {      set SensorId [hm_getentityvalue comps $CompId \$ELEM_TYPE 0 -byid]      set ElemType [hm_getcardimagename sensors $SensorId]      set ConfigType [hm_getconfigtypeincol comps elems $CompId -byid]      switch -- $ElemType {           SOLID95 {                set Config 210                set Type [lindex [hm_entityinfo configtypeids elems hex20] [lsearch [hm_entityinfo configtypes elems hex20] SOLID95]                if {[llength $ConfigType]&&![string equal $ConfigType '$Config $Type']} {                     puts 'Comp $CompId contains other elements than SOLID95'                }           }      } }

     

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited September 2017

    Hi tinh,

    Thanks for sharing ur thoughts.

    *createmark elements 1 'by component' $n
       set comp_type [hm_getvalue elements mark=1 dataname=typename]

    I used the above to get it.

    after I make unique list and check length of list to be 1 .