Jump to content
mahes

ETtype and Element config mismatch

Recommended Posts

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

Share this post


Link to post
Share on other sites
3 hours ago, tinh said:

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
 

Share this post


Link to post
Share on other sites

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"
               }
          }
     }
}

 

mahes likes this

Share this post


Link to post
Share on other sites

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 .

tinh 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.

Guest
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...