How to take Properties Name and Material Name of Comps of *.inp file

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

Dear all,

 

I am studying writing tcl code to speed up modeling model,

 

Currently, I want to check Properties Name and Material Name of all Components in model.

 

Input model: *.inp (Abaqus form)

 

Now, from Comps > find Properties ID > Material ID

Then, take Name from Properties and Material ID

 

Are there any faster way to get the Properties Name and Material Name directly from Comps ID?

 

Thank you so much.

Tagged:

Answers

  • tinh
    tinh Altair Community Member
    edited November 2018

    from Comps > find Properties ID > Material ID

     

    hm_getvalue comps id=$CompId dataname=property.name

    hm_getvalue comps id=$CompId dataname=material.name

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited November 2018

    hm_getvalue comps id=$CompId dataname=material.name

    Dear Tinh,

    Thank you so much for your response.

     

    However seem we can not take the material.name from Components, I ran on my model the return result for material is NA,

    if I change to material.id the return value is 0.

    Currently, I can get the material.name from property.id

    hm_getvalue props id=$PropsId dataname=material.name

     

    Could you please have a check on it?

  • tinh
    tinh Altair Community Member
    edited November 2018

    Yes I see

    If material is pointed by property then you can refer to it from comp ID via:

     

    hm_getvalue comps id=$CompId dataname=property.material.name

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited November 2018

    Dear Tinh,

     

    Thank you so much for your information, it worked well on my model.

     

    Have a nice day.