A button for terminate a script running

Altair Forum User
Altair Forum User
Altair Employee
edited October 2020 in Community Q&A

Hello Everybody, I´m a new user of scripting for hypermesh. I would like if someone here knows if it is possible to display a button while a script is running in order to let the user the chance for stop the script. Thank a lot.

Tagged:

Answers

  • tinh
    tinh Altair Community Member
    edited June 2015

    Hi,

    If your script run for long time due to hypermesh command (you feel hm freezing), stop it by holding down RMB on graphic area

    If your script run for long time due to some loops (ex: for..., while,...), stop it by a break, example: if {::stop} {break} and the button will set ::stop = 1 when clicked

    remember to 'update' GUI within loops otherwise the button will frozen also and you cannot activate it

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited June 2015

    Hi,

    If your script run for long time due to hypermesh command (you feel hm freezing), stop it by holding down RMB on graphic area

    If your script run for long time due to some loops (ex: for..., while,...), stop it by a break, example: if {::stop} {break} and the button will set ::stop = 1 when clicked

    remember to 'update' GUI within loops otherwise the button will frozen also and you cannot activate it

    thank you