🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

active TCL script in two HyperMesh windows

User: "Beta"
New Altair Community Member
Updated by Beta

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!

 

 

Find more posts tagged with

Sort by:
1 - 6 of 61
    User: "tinh"
    Altair Community Member
    Updated by tinh

    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

    User: "Beta"
    New Altair Community Member
    OP
    Updated by Beta

    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!

    User: "tinh"
    Altair Community Member
    Updated by tinh

    The usage is listed in Tcl/tk manual. I found it by google (actually everything about tcl I found by google, too)

    User: "Beta"
    New Altair Community Member
    OP
    Updated by Beta

    Thank you, this time I tried to add more TCL keyword and found it. 

    User: "Pandurang"
    Altair Community Member
    Updated by Pandurang

    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.

     

    User: "tinh"
    Altair Community Member
    Updated by tinh

    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