hm_entityinfo

evsm1982
evsm1982 Altair Community Member
edited October 2020 in Community Q&A

Hello, 

 

I don't know what am I doing wrong.

 

I tried to get property name - this works fine.

 

I tried to get property id - this is not OK.

 

set entity_name [hm_entityinfo name props $old_prop ] - this will return the property name - everything is OK

 

set entity_id [hm_entityinfo id props $old_prop -byid ] - this will return the property id as '2' even if the property id is 123123      WHY?:(/emoticons/default_sad.png' srcset='/emoticons/sad@2x.png 2x' title=':(' width='20' /> 

 

Thank you.

Tagged:

Welcome!

It looks like you're new here. Sign in or register to get started.

Answers

  • evsm1982
    evsm1982 Altair Community Member
    edited November 2016

    Hello, 

     

    I succeeded using hm_getmark. This gave me the component id that is useful for me.

     

    Thank you.

     

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited November 2016

    set xentity_id [hm_entityinfo id props $old_prop -byid]

    set entity_id [hm_getsolverid props $xentity_id]

     

    should work for you

  • evsm1982
    evsm1982 Altair Community Member
    edited November 2016

    Hello,

     

    This works. :)/emoticons/default_smile.png' srcset='/emoticons/smile@2x.png 2x' title=':)' width='20' />

     

    Thank you.

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited December 2016

    set xentity_id [hm_entityinfo id props $old_prop -byid]

    set entity_id [hm_getsolverid props $xentity_id]

     

    should work for you

    Hi....

    I am trying to get the property ID using the same commands but cannot.

    The entityinfo command is not working for ID and the getsolverid is returning both ID and domain.

    I tried getentityvalue too but not working.

     

    How can I get only the property ID in a loop. Please suggest.

    Thanks in advance!!

  • tinh
    tinh Altair Community Member
    edited December 2016

    hi

    why need hm_entityinfo id while old_prop is already id?

    al you nèed is 

    set prop_sid [lindex [hm_getsolverid props $old_prop] 0]

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited December 2016

    Thanks Tin, I`ve understood the concept!!

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.