Control HM by a Bat and Show panel

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

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 D:\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.

<?xml version="1.0" encoding="UTF-8"?>assign.jpg

<?xml version="1.0" encoding="UTF-8"?>lm.jpg

Tagged:

Answers

  • tinh
    tinh Altair Community Member
    edited February 2017

    Hi,

    you can run your script by command:

    source D:/Desktop/test.tcl  ;# (do not use D:\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

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited February 2017

    Hi,

    you can run your script by command:

    source D:/Desktop/test.tcl  ;# (do not use D:\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?

    <?xml version="1.0" encoding="UTF-8"?>command.jpg

    <?xml version="1.0" encoding="UTF-8"?>pulldown menu.jpg

  • tinh
    tinh Altair Community Member
    edited February 2017

    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!

     

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited February 2017

    Hi tinh, 

    All these information is usefull for me.

    Thank you again.