🎉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

Using *evaltclstring in globalpage.mac with double quotes inside

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

How can I use the *evaltclstring function in a globalpage.mac file in hypermesh when the tcl string inside it also has double quotes, such as,

 *evaltclstring('set t1 [string map {'\n\n' '\n'} $t1]; puts $t1;',0)

Any help is appreciated because the above command results in my hypermesh becoming unresponsive on startup.

 

Thank you.

Find more posts tagged with

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

    Hi,

     

    don't mess up macro file, just wrap the tcl command in a proc, and use *evaltclstring to invoke that proc

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

    Hi,

     

    don't mess up macro file, just wrap the tcl command in a proc, and use *evaltclstring to invoke that proc

    @tinh : How would I use evaltclstring to invoke a proc and where should I be defining the proc itself ?

     

    Additionally, I'd also like to know, just for the sake of completeness, that how could I escape double quotes inside double quotes while using *evaltclstring ?

    User: "tinh"
    Altair Community Member
    Updated by tinh

    I think I already gave an example using evaltclstring to invoke your user page on utility tab. just refer to it