What is the script to generate pop up while saving the model or exporting model

ila
ila Altair Community Member

I wanted to ask how to write tcl script that gives pop up once we go & save the model or preferably export the model.

Its a bit urgent & replies will be helpful.

@tinh Hi,

Your posts are very helpful. It will be useful if you could help.

Following tcl script I generated using GUI

HWVERSION_2020.0.0.71_May 28 2020_19:55:17

#Get preview frame
set w [hwtk::demo::getpreviewframe]

if {[winfo exists .d]} {destroy .d}
namespace eval ::texample {variable Priv}
proc ::texample::OnOk {} {
variable Priv
parray Priv
.d unpost
}

hwtk::dialog .d -title Dialog -transient [winfo toplevel $w]
.d hide apply
.d post
set recess [.d recess]

pack [hwtk::checkbutton $recess.check1 -text "hwtk::Do you want to renumber the nodes ? " -variable ::texample::Priv(life) ] -anchor nw
.d buttonconfigure ok -command ::texample::OnOk

Reards,

Ila

Tagged:

Answers

  • Michael Herve_21439
    Michael Herve_21439
    Altair Employee

    hello @ila ,

    tk_getSaveFile is the command that opens a pop-up for file saving

    this returns the file name as a variable:

    set outputfile [tk_getSaveFile]

    Then you need to get the export command and proper arguments from command.tcl once you run the export once interactively

    Best Regards,

    Michael