What is updated command for *materialupdate in latest HyperMesh 2021 version?

Akshay Manthekar
Akshay Manthekar Altair Community Member
edited June 2022 in Community Q&A

Hi Guys,

I want to know how to update material for property using tcl command.

In hm 2017 I used this: *materialupdate properties 1 "$mat_name"

I know that *materialupdate is deprecated and now we use *setvalue. 

Does anyone has idea how should I write it in updated version?

 

Your help is much appreciated.

Thank You!

Answers

  • Ben Buchanan
    Ben Buchanan
    Altair Employee
    edited June 2022

    The following should work for you:

    *setvalue prop mark=1 materialid=[hm_getvalue mat name="$mat_name" dataname=id]

  • Akshay Manthekar
    Akshay Manthekar Altair Community Member
    edited June 2022

    Hi Ben,

    Thanks for your response.

    When I used the above command, it is giving error like:

    hm_getvalue : Requires 3 parameters

    In documentation of hm_getvalue, only 2 parameters are needed and others are optional.

    Can you help?

    My code look like this:

    image

  • Ben Buchanan
    Ben Buchanan
    Altair Employee
    edited June 2022

    Hi Ben,

    Thanks for your response.

    When I used the above command, it is giving error like:

    hm_getvalue : Requires 3 parameters

    In documentation of hm_getvalue, only 2 parameters are needed and others are optional.

    Can you help?

    My code look like this:

    image

    There is a space between mat and name (not an underscore) so like below the three parameters are material(entity type), name=$mat_name(how you are identifying the desired entity) and dataname=id(what you want).

    hm_getvalue material name=$mat_name dataname=id

    https://2022.help.altair.com/2022/hwdesktop/hwd/topics/reference/hm/hm_getvalue.htm?zoom_highlight=hm_getvalue

  • Akshay Manthekar
    Akshay Manthekar Altair Community Member
    edited June 2022

    Thanks a lot, Ben!!

    This is exactly I was looking for :)