Control HM by a Bat and Show panel
Hello, everyone. I have 3 questions here.
1. Is there a way to let HM run a tcl by a batch file or other exe? I have tried :
'C:\Program Files\Altair\14.0\hm\bin\win64\hmopengl.exe' -tcl \Desktop\test.tcl
This will open a new HM window, but I want to let a current running HM to execute my specified TCL.
2. After I created a property, I right click my mouse, choose assign, then choose elements and proceed. How to show the chosing element panel for assigning elements of a specified property by TCL?
3.How to set paramenters of the { line mesh } panel by TCL?
Any information will be appreciated.
Answers
-
Hi,
you can run your script by command:
source /Desktop/test.tcl ;# (do not use \Desktop\test.tcl)
and to set values for line mesh panel:
hm_setinputentry {line mesh} [hm_getitemnumber 'line mesh' 'x comp ='] 1.0
to invoke assign context menu cmd:
#tomorrow I will check
0 -
Altair Forum User said:
Hi,
you can run your script by command:
source /Desktop/test.tcl ;# (do not use \Desktop\test.tcl)
and to set values for line mesh panel:
hm_setinputentry {line mesh} [hm_getitemnumber 'line mesh' 'x comp ='] 1.0
to invoke assign context menu cmd:
#tomorrow I will check
Thanks very much, tinh.
For question 1, I mean that I want to excute my tcl script in a running hm by command from cmd of windows.
For question 3, hm_setinputen works well for text entry! But how to set the value of a pulldown menu?
0 -
Hi,
Not sure why you need to make it complicated.
you can send requests to hypermesh session via dde, socket like a client-server
at hypermesh side, it is possible (tcl has commands dde, socket)
but at window console side, you should search for relevant commands by your self
menu is not an input-entry, so you need command hm_setpopup, example
hm_setpopup {line mesh} [hm_getitemowner {line mesh} [hm_getitemnumber {line mesh} bar2]] [hm_getitemnumber {line mesh} bar2]
and for assign menu cmd. it invoke a proc to assign prop to some elems. If you need, write a similar proc is easier than invoke it because you need to get property name!
0 -
Hi tinh,
All these information is usefull for me.
Thank you again.
0