TCL - Get current value of Loadcol ADD cards

Blake Berk
Blake Berk Altair Community Member
edited March 2021 in Community Q&A

Hi,

With TCL, I am trying to update the value of a loadadd/mpcadd/spcadd card, but I cannot find a function that will give me the current number of entities nor the current value of those entities. I want to be able to get the current value and then reset. I know the *setvalue to set the value of the array, but I cannot seem to find how to get the existing entity.

Thanks,

Blake

Best Answer

  • Adriano Koga_20259
    Adriano Koga_20259 New Altair Community Member
    edited March 2021 Answer ✓

    Hi @Blake Berk 

     

    There is an example script in HM Installation folder, that i find extremely useful when you need to find out what is the 'dataname' to be queried by the hm_getvalue command in order to find some particular value of a specific entity in your model.

    "C:\Program Files\Altair\2021\hwdesktop\hm\examples\scripts\entity_attribute_table.tcl"

    If you run the above script, it will bring you a new browser, where you can select any existing entity in your model and query its datanames and respective values associated to it.

    Knowing these datanames, it is pretty easy to query data using hm_getvalue command, or setting some value with *setvalue.

    image

Answers

  • Adriano Koga_20259
    Adriano Koga_20259 New Altair Community Member
    edited March 2021 Answer ✓

    Hi @Blake Berk 

     

    There is an example script in HM Installation folder, that i find extremely useful when you need to find out what is the 'dataname' to be queried by the hm_getvalue command in order to find some particular value of a specific entity in your model.

    "C:\Program Files\Altair\2021\hwdesktop\hm\examples\scripts\entity_attribute_table.tcl"

    If you run the above script, it will bring you a new browser, where you can select any existing entity in your model and query its datanames and respective values associated to it.

    Knowing these datanames, it is pretty easy to query data using hm_getvalue command, or setting some value with *setvalue.

    image

  • Blake Berk
    Blake Berk Altair Community Member
    edited March 2021

    Hi @Blake Berk 

     

    There is an example script in HM Installation folder, that i find extremely useful when you need to find out what is the 'dataname' to be queried by the hm_getvalue command in order to find some particular value of a specific entity in your model.

    "C:\Program Files\Altair\2021\hwdesktop\hm\examples\scripts\entity_attribute_table.tcl"

    If you run the above script, it will bring you a new browser, where you can select any existing entity in your model and query its datanames and respective values associated to it.

    Knowing these datanames, it is pretty easy to query data using hm_getvalue command, or setting some value with *setvalue.

    image

    Thank you. Neat trick that was ultimately helpful in solving problem! Sorry I didn't respond right away - I forgot to update the correct answer! Appreciate the speed of response!