🎉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

Work on hypermesh while macro is running in background?

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

Hello,

 

Is it possible to work on hypermesh when we are running a Tcl/Tk script?

 

I would like to use 'after 10000' command to halt the execution of the script for some time and I would like to work on hypermesh meanwhile.

 

Thank you.

Find more posts tagged with

Sort by:
1 - 4 of 41
    User: "llyle_20499"
    New Altair Community Member
    Updated by llyle_20499

    Hi Harish,

     

    If i'm not wrong, after 10000 will merely delay execution of next line. So what operation do you want to do in hypermesh? 

    User: "QuyNguyenDai"
    Altair Community Member
    Updated by QuyNguyenDai

    IMHO, Hypermesh session can't run on multi-thread proc. So you can't do different tasks in parallel.

    @ Altair's experts: correct me if I'm wrong?

     

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

    Hi Livil Lyle,  'after 10000' I gave as an example. Actually, I would like the execution of the program to be halted by 30 minutes.

     

    Basically, I'm trying to write a 'save as' reminder program, which saves the file every 30min in a specified format.

     

     

     

    User: "tinh"
    Altair Community Member
    Updated by tinh

    Hi Harish

    To halt a runnning script, you can use tkwait

    Ex:

    proc ::p_RunningScript args {

        #a very long time script

        for {set i 0} {$i<1000000000} {incr i}

              Do something...

              if {!($i%1000)} update

              if {$::halt} {

                   tkwait variable ::halt

             }

        }

    }

     

    #before running, indicate halt=0

    set ::halt 0

    ::p_RunningScript

     

    #to halt above script, set halt = 1

    set ::halt 1

    #then call your save as reminder

    p_SaveAsReminder

     

    #to continue the halt script:

    set ::halt 0

     

    ;)/emoticons/default_wink.png' srcset='/emoticons/wink@2x.png 2x' title=';)' width='20' />