🎉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

How do I run a script (.tcl) on HyperMesh directly from an Excel macro (Visual Basic)?

Carlos_21231User: "Carlos_21231"
New Altair Community Member
Updated by Carlos_21231

Hi,

I am creating a script .tcl, which is generated by a Macro on Visual Basic, depending on certain inputs that are introduced into an Excel SpreadSheet.

I would like to be able to run that generated .tcl file on HyperMesh and open the Model that it contains. But all of this, without the need of opening myself the program and clicking in the Toolbar to run this .tcl file.

INPUTS -> Excel SpreadSheet -> Macro (VBA) -> .tcl script-> open HyperMesh -> run the .tcl script

(All above is done within visual Basic environment)

Does anyone how to do it? Thanks in advance!

Carlos

 

 

Find more posts tagged with

Sort by:
1 - 4 of 41

    You can call hw.exe and use some arguments such as -tcl to call a tcl script automatically.

    Please take a look at the attached documentation.

     

    I don't know how to call this from VB, but i'm pretty sure Google knows some command.

    Carlos_21231User: "Carlos_21231"
    New Altair Community Member
    OP
    Updated by Carlos_21231

    Hi Adriano,

     

    Could you please show me an example? I am a nobby with -tcl language.

     

    The path to HW executable in my computer is:

    C:\Program Files\Altair\2020\hwdesktop\hw\bin\win64\hw.exe

     

    The tcl scrip I want to open is here:

    C:\Users\c.badillo\Desktop\Trial.tcl

     

    Thanks in advance!

    Adriano_KogaUser: "Adriano_Koga"
    Altair Employee
    Accepted Answer
    Updated by Adriano_Koga

    Hi Adriano,

     

    Could you please show me an example? I am a nobby with -tcl language.

     

    The path to HW executable in my computer is:

    C:\Program Files\Altair\2020\hwdesktop\hw\bin\win64\hw.exe

     

    The tcl scrip I want to open is here:

    C:\Users\c.badillo\Desktop\Trial.tcl

     

    Thanks in advance!

    if it was a Windows command prompt, you would run something like:

     

    call "C:\Program Files\Altair\2020\hwdesktop\hw\bin\win64\hw.exe" -tcl "C:\Users\c.badillo\Desktop\Trial.tcl" -b -clientconfig hwfepre.dat

     

    -tcl set the path for your tcl script

    -b to run in batch mode

    -clientconfig defines that you're starting HyperMesh

     

    Probably VB has some command to execute this command line, or call a .bat file.

     

    Carlos_21231User: "Carlos_21231"
    New Altair Community Member
    OP
    Updated by Carlos_21231

    Thanks for the answer Adriano. It worked perfectly.