Jump to content

Recommended Posts

Hello everyone,

i am new to Tcl programming and worked little bit with command.tcl file to create simple scripts. But now I would like to create a script with the help of if loop. I wanted the script automatically create the solids with bounding surfaces option and if the solids already exist in the model then to return. Can someone help me with this?

 

I could only come out with this.

 

*createmark surfaces 1 "displayed"
*solids_create_from_surfaces 1 4 -1 2

 

Thank s and regards,

Punith

Share this post


Link to post
Share on other sites

Hello Punith, 

 

You can try the below,


*createmark surf 1 "displayed"
catch {*solids_create_from_surfaces 1 4 -1 2} status;
if {$status == 1} {
    puts "Solid Created Successfully";
} else {
    puts "Solid Creation Failed";
}

 

to create using loops, please give more information. 

 

Mrt likes this

Share this post


Link to post
Share on other sites

Can you tell me where to find expressions like catch and using IF function?I searched a lot in Hypermath help files but unable to find it.

 

Thanks and regards,

Punith

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.

Guest
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...