unpublished TCL functions documentation

IngeniosIT
IngeniosIT Altair Community Member
edited September 2023 in Community Q&A

Dear All,

I'm for the first time using the script parser in order to update the TCL scripts used by my company.

Let me precise that the scripts were not created by myself but by a colleague which left the company few month ago.

The script parser is really a good tool but I cannot find documentation for some functions, like this one :

*collectorcreate loadcols "$load_case($i,0)\_$load_case(0,$j)" "" [expr (3*$i)+$j]

It is complicated to understand all the parameters used. In fact I dont understand what the parameter is used for : [expr (3*$i)+$j]

 

Is there some documentation (maybe offline one, such as pdf ?) to help me upgrading these scripts ?

Thanks in advance for your help.

 

BR,

Antoine

 

Tagged:

Answers

  • Ben Buchanan
    Ben Buchanan
    Altair Employee
    edited September 2023

    *collectorcreate has been replaced with *createentity which is documented. The expr command is a tcl command used to do calculations. So [expr (3*$i)+$j] gives you the the result of 2 times the value of the variable i plus the value of the variable j.

    Below are the links for the help pages for the tcl expr command and the *createentity command and they are also attached as pdfs.

    https://www.tcl.tk/man/tcl8.5/TclCmd/expr.html

    https://help.altair.com/hwdesktop/hwd/topics/reference/hm/_createentity.htm

     

  • IngeniosIT
    IngeniosIT Altair Community Member
    edited September 2023

    Dear Ben,

     

    Thanks for your reply, I understand the expr command, but what I need it to have the documentation for previous commands (*collectorcreate for example). COuld you provide me this kind of documentation ?
    Thanks in advance.

     

    BR,
    Antoine

  • Ben Buchanan
    Ben Buchanan
    Altair Employee
    edited September 2023

    Dear Ben,

     

    Thanks for your reply, I understand the expr command, but what I need it to have the documentation for previous commands (*collectorcreate for example). COuld you provide me this kind of documentation ?
    Thanks in advance.

     

    BR,
    Antoine

    I would just replace the *collectorcreate command with the *createentity command.

  • Ben Buchanan
    Ben Buchanan
    Altair Employee
    edited September 2023

    Dear Ben,

     

    Thanks for your reply, I understand the expr command, but what I need it to have the documentation for previous commands (*collectorcreate for example). COuld you provide me this kind of documentation ?
    Thanks in advance.

     

    BR,
    Antoine

    Looks like the first argument is name and the third is color. So from this:

    *collectorcreate loadcols "$load_case($i,0)\_$load_case(0,$j)" "" [expr (3*$i)+$j]

    You could do this:

    *createentity loadcols name="$load_case($i,0)\_$load_case(0,$j)" color=[expr (3*$i)+$j]