How to create a custom GUI for changing the values of mesh size, type etc... into an existing script and to execute to various components?

RAJA R
RAJA R Altair Community Member
edited March 2022 in Community Q&A

Hi,
I have an existing script which is a generalized one and to execute the same script file on different CAD models which has a change in dimensions, every time I was editing the values in the old script to make the new one. So is there any custom GUI that I can create for changing the values into the script & executing it to different CAD files??

Thanks & regards,

Raja R.

Answers

  • Ben Buchanan
    Ben Buchanan
    Altair Employee
    edited March 2022

    Yes!  hm_getfloat is the command you want.  It would look something like this:

    set userValue [hm_getfloat]

    Then using $userValue in place of that value in your script.
    https://2021.help.altair.com/2021.2/hwdesktop/hwd/topics/reference/hm/hm_getfloat.htm?zoom_highlight=hm_getfloat

    This will get one value at a time so if you have multiple value you might want to create a dialog box and have multiple fields to be able to enter them all at once.  You can look at HWTK GUI Toolkit (in the Altair folder in the start menu) that has examples. I would suggest a property area as probably the easiest and fastest way to get multiple values.