Issue with *createbutton.

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

Hi,

I am doing like below.

*createbutton(5, 'Import Model', 0, 0, 10, BLUE, 'Import Model.', EvalTcl, '$::env(FRAME_DIR_PATH)\IMPORT.tcl')

where FRAME_DIR_PATH = Path of the folder which contains IMPORT.tcl.

it is giving error as

---------------------------

Tcl/Tk script error ...

---------------------------

evaltclscript error:

The specified file 'C:\TEST\IMPORT.tcl' could not be found.

---------------------------

OK

---------------------------

where i set FRAME_DIR_PATH = C:\TEST

any one tell me how to call a tcl file which is not in any HM folders.

Thanks

Tagged:

Answers

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited October 2010

    You can just provide the full path directly in the *createbutton command:

    *createbutton(5, 'ImportModel', 0, 0, 10, BLUE, 'macro to import the model', 'EvalTcl','c:\dir1\dir2\dir3\import.tcl')

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited November 2010

    You can set TCL_INCLUDE in PC.

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited November 2010

    also, you may need to normalize the path of your env variable;

    [file normalize $::env(FRAME_DIR_PATH)]