TCL Command to find STATUS of defined Entity

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

Hello Everyone,

 

I know how to retrieve the information from already defined entity in a material but i dont know how to get the status of the defined Entity.

 

For Example:  hm_getvalue mats id=4 dataname=E 

 

In this way i get the value of the defined entity in material but how can i know STATUS if the entity is defined or its not defined and activated.

 

What can be the DATANAME to find the STATUS of the DEfined entity in a material.

 

hm_getvalue mats id=4 dataname=E  STATUS= 0 or 1

 

But this approach doesnt works do u have any idea to get this command or Dataname ??

 

 

BR,

 

Ashish

 

Answers

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited October 2017

    Hi Ashish,

    Can you try with hm_attributelist, which returns a list of all attribute IDs or names assigned to a specific entity for the current template.

    The syntax is hm_attributelist entity_type entity_name_or_id value ?search_type?

    After this you can query for each data name. 

    <?xml version="1.0" encoding="UTF-8"?>hm.PNG

  • Ashish_MEXPERT
    Ashish_MEXPERT Altair Community Member
    edited October 2017

    Hi George,

     

    Thanks for your reply !

     

    I am able to get the values of attributes like E NU and RHO with the command hm_getvalue mats id=5 dataname=E 

     

    Problem is If the value is not defined in it then also it fetches the default values defined in the attributes.

     

    I want to know how can i know if the value is really defined in the attributes like E, NU and RHO or it is not defined by the user and it is fetching deafult values in it ?

     

    Thanks !

     

    BR Ashish

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited October 2017

    Hi,

    When we query for a dataname it's showing the previous entry. Even if we remove the value it's still showing the same. I'll check regarding this the concerned team and will update you.

    Meanwhile, if for any dataname no values were provided then it will show as 0.

     

  • tinh
    tinh Altair Community Member
    edited October 2017

    Hi

    Use hm_attributestatus to check status of the attribute

  • Ashish_MEXPERT
    Ashish_MEXPERT Altair Community Member
    edited October 2017

    Hi,

     

    Thanks Tinh and George !

     

    hm_attributestatus and hm_defined worked for me.

     

    Regards,

     

    Ashish