🎉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 to pass arguments to tcl script on Hyperworks start

User: "Altair Forum User"
Altair Employee
Updated by Altair Forum User

Hi,
I have a tcl script and the tcl is using Hyperworks(Hyperview) library, so I must run it with Hyperview.
I check the help doc and found the following command to load tcl:

 <altair_home>/hw/bin/<platform>/hw.exe -clientconfig hwpost.dat -tcl example.tcl

But I cannot pass an argument to the tcl.
For example, I can run this tcl using:

 tclsh example.tcl arg1 arg2 ...

The arguments arg1, arg2 will be passed to tcl script, Can I do this using hw.exe -tcl command?

Thanks!

Find more posts tagged with

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

    Hi

    you can do it normally

    hw.exe -clientconfig hwpost.dat -tcl example.tcl arg1 arg2

     

    you will scan these args right after 'example.tcl', so

    set arglist [lrange $args [lsearch -exact $args 'example.tcl'] end]

    lassign $arglist TclFileName arg1 arg2