Jump to content

Recommended Posts

Hey guys,


I'm looking for a .tcl-command to completely close a program. The program starts with a messagebox where you can choose yes or no. If you select yes, the program runs as it is planned.

If you choose no, the whole program should stop. There for I used the exit 2 command.

But instead of closing the whole program it only closes the message box and tries to run the code afterwards.

Do you have an idea how to fix that problem?


This is the relevant part of the code:

set starting [tk_messageBox -message "Möchten Sie eine vorhandenes Modell verwenden?" -type yesno -icon question -title "Einladen des Modells"]
switch -- $starting {
yes {
set basedir {C:/}
set filetypes {{{Text} {*.fem}} {{Alle} {*}}}

set par [tk_getOpenFile \
        -initialdir [pwd]\
        -title "Startdatei wählen..."\
        -filetypes $filetypes
    *feinputwithdata2 "\#optistruct\\optistruct" "$par" 0 0 0 0 0 1 9 1 0
    no {
        exit 2

*createentity mats cardimage=MAT1 name=material1



Kind regards,


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.

Sign in to follow this  

  • Create New...