Jump to content

Using *evaltclstring in globalpage.mac with double quotes inside

Recommended Posts

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.

Share this post

Link to post
Share on other sites
11 hours ago, tinh said:



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 ?

Edited by jcd

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

You are posting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...