Jump to content
Sign in to follow this  
Richsmith

HyperMesh 14.0 Auto Save Script

Recommended Posts

Hi, has anyone got an autosave script (or some other way of doing this) for HM14.0?

 

I would love a script that would, lets say, save every hour automatically to a new sequenced version of the file.

 

Thanks for any help.

 

Richard.

Share this post


Link to post
Share on other sites
Guest

Hi Richard,

 

There is no option for now to autosave HM files at regular interval, Maybe you can write a code to run a tcl script which autosaves session/hm file at regular intervals

 

There is a a command called *setautosaveinterval(#) but this won't work for HyperMesh application.

Share this post


Link to post
Share on other sites

Hi, I see an available script. To use it, type command

source [file join [hm_info -appinfo SPECIFIEDPATH hm_scripts_dir] autosave.tcl]

autosave::CreateDialog

 

or you can make a simple script:

proc ::myautosave minutes {
     catch {
          file rename [hm_info currentfile] [hm_info currentfile].[clock seconds]
          ::HM_Framework::p_SaveFile
     }
     uplevel #0 [list after [expr $minutes*60000] [list ::myautosave $minutes]]
}

 

Share this post


Link to post
Share on other sites
On 1/20/2017 at 11:21 AM, tinh said:

Hi, I see an available script. To use it, type command

source [file join [hm_info -appinfo SPECIFIEDPATH hm_scripts_dir] autosave.tcl]

autosave::CreateDialog

 

or you can make a simple script:


proc ::myautosave minutes {
     catch {
          file rename [hm_info currentfile] [hm_info currentfile].[clock seconds]
          ::HM_Framework::p_SaveFile
     }
     uplevel #0 [list after [expr $minutes*60000] [list ::myautosave $minutes]]
}

 

Mr. Tinh,

 

How you had learned the TCL/TK?  Whether you had learned on your own by watching the tutorials?

 

Sorry for disturbing you with this type of questions. Why am asking this question to you is , I want to know how experts were learned this language.

 

Awaiting for your reply Mr. Tinh.

 

Regards,

Saravanan R

Share this post


Link to post
Share on other sites

Actually i am not a tcl expert - it is used widely. I learned hypermesh before tcl. Once you're familiar with most hypermesh features, scripting is not a problem because hypermesh outputs every action of you, pick each command from command.cmf file, look it up in hm reference guide, do examples given by altair.

Tcl features are listed in manual (activestate.com) similar to other languages. This is the most simple syntax language I ever know and much easier than pascal.

Saravanan R and Dinesh c like this

Share this post


Link to post
Share on other sites
On 3/18/2019 at 9:20 PM, tinh said:

Actually i am not a tcl expert - it is used widely. I learned hypermesh before tcl. Once you're familiar with most hypermesh features, scripting is not a problem because hypermesh outputs every action of you, pick each command from command.cmf file, look it up in hm reference guide, do examples given by altair.

Tcl features are listed in manual (activestate.com) similar to other languages. This is the most simple syntax language I ever know and much easier than pascal.

Thanks Mr. tinh, this one really helps me.

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.

Guest
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...