Guest Report post Posted February 11, 2008 I would like to create a simple loop however I'm not very good in programing... My script is like this but instead of "..." I would like to create a loop which would work till I press return or escape. Is there any simple method?*createbutton(5, "Triad", 18, 0, 4, BUTTON, "Create Triad", "macroTriad")*beginmacro(macroTriad) <cr> *createlistpanel(nodes,1,"Select nodes") <cr> *createelement(103,1,1,1) <cr>... *createlistpanel(nodes,1,"Select nodes") <cr> *createelement(103,1,1,1) <cr>*endmacro() <cr>Kind regards,Lukasz Quote Share this post Link to post Share on other sites
Guest Report post Posted February 15, 2008 Hi,I don't understand what you want exactly, a simple loop looks like this ...------------------------------------------------------------------------------ *createmarkpanel elements 1 "Select elements ..." set element_mark [hm_getmark elements 1] foreach eid $element_mark { tk_messageBox -message "Element : $eid" }------------------------------------------------------------------------------or ------------------------------------------------------------------------------set stop 0while {$stop == 0} {# your code here set stop 1} ------------------------------------------------------------------------------Regards,Mario Quote Share this post Link to post Share on other sites
MEIYARASU19 0 Report post Posted February 26 hello... i would like to make a script to delete assemblies and sub assemblies in one action... that's need a loop script..please help me Quote Share this post Link to post Share on other sites
tinh 739 Report post Posted February 27 Hi Use while loop: Condition is 'remain emptied assem' use *EntityPreviewEmpty and hm_marklength to check that condition Body is 'delete them' , use *deletemark Quote Share this post Link to post Share on other sites
MEIYARASU19 0 Report post Posted February 28 can you give the full script for me. because i dont know how to make it Quote Share this post Link to post Share on other sites
Pooja S 18 Report post Posted March 4 Hi MEIYARASU19 Refer the example script from below link https://connect.altair.com/CP/script-list.html Quote Share this post Link to post Share on other sites
tinh 739 Report post Posted March 4 If you don't know how to make script I recommend you to learn tcl programming first, not to make tons of questions. Tcl is easy. Quote Share this post Link to post Share on other sites
MEIYARASU19 0 Report post Posted March 6 On 3/4/2019 at 12:38 PM, tinh said: If you don't know how to make script I recommend you to learn tcl programming first, not to make tons of questions. Tcl is easy. Thank you Quote Share this post Link to post Share on other sites
MEIYARASU19 0 Report post Posted March 6 On 3/4/2019 at 11:20 AM, Pooja S said: Hi MEIYARASU19 Refer the example script from below link https://connect.altair.com/CP/script-list.html Thank you Quote Share this post Link to post Share on other sites