hypermesh tcl question for determine hypermesh file save?

shiucomp5
shiucomp5 Altair Community Member
edited February 2024 in Community Q&A

hi all,

i am new for hypermesh tcl beginer.

i want to determine the hypermesh save?

this is my code,should i use [hm_info currentfile] correct?

======================================

set currentFilePath [hm_info currentfile]

if {$currentFilePath ne ""} {
     puts "The file has been saved."
     } else {
     tk_messageBox -title "Reminder" -message "Please remember to save the file!"
 }

======================================

Tagged:

Welcome!

It looks like you're new here. Sign in or register to get started.

Answers

  • Ben Buchanan
    Ben Buchanan
    Altair Employee
    edited February 2024

    There are probably other ways to do it too but your code seems to work.

  • shiucomp5
    shiucomp5 Altair Community Member
    edited February 2024

    There are probably other ways to do it too but your code seems to work.

    hi,

    can you make some example?

    i want to learn some about useful example,thanks

  • Ben Buchanan
    Ben Buchanan
    Altair Employee
    edited February 2024
    shiu comp said:

    hi,

    can you make some example?

    i want to learn some about useful example,thanks

    Actually the more I think about it the more this seems covered by the core functionality. If you try and close a file without saving it will prompt you to save it. What case are you seeing where this doesn't happen?

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.