active TCL script in two HyperMesh windows
Hi,
I am looking for a solution to make TCL scripts active in two HyperMesh windows simultaneously.
Let say I am having two HM windows opening simultaneously, I run a TCL script from a window. This file contains a GUI interface.
I expect that when I perform an action on the TCL GUI ( eg: click a button), the command will be executed in both windows
Any idea will be very appreciated. Thank you!
Answers
-
Hi,
If HM windows are run on same machine, you just need to load dde package, create dde topics to communicate between the windows
if HM windows are run on different machines, you need to use socket command.
another 'trivial' method: after performing some actions on window#1, output those commands to a *.tcl file
(or clipboard)
and on window#2, set a timer script that scans for the file or clipboard, detects those commands, then performs them
0 -
hi Tinh,
Thank you for your answer,
However, I am not clear about dde package. Could you please recommend a source which I can find more information about this?
Thank you!
0 -
The usage is listed in Tcl/tk manual. I found it by google (actually everything about tcl I found by google, too)
0 -
Thank you, this time I tried to add more TCL keyword and found it.
0 -
Altair Forum User said:
Hi,
If HM windows are run on same machine, you just need to load dde package, create dde topics to communicate between the windows
if HM windows are run on different machines, you need to use socket command.
another 'trivial' method: after performing some actions on window#1, output those commands to a *.tcl file
(or clipboard)
and on window#2, set a timer script that scans for the file or clipboard, detects those commands, then performs them
dde execute ?-async? service topic data
here what are the supported topic by HM.
0 -
Hm does not have default topic.
You have to create topic by command:
dde servername -handle ...
Handling proc will process data passed by dde execute, you have to define this proc, too
0