Simio
  • Saving SIMIO experiments automatically while they run.

  • Do you have objects, models, libraries, path decorators, textures, symbols, custom API code, documentation, or anything else others might find useful? Please attach it here with a brief description.
Do you have objects, models, libraries, path decorators, textures, symbols, custom API code, documentation, or anything else others might find useful? Please attach it here with a brief description.
 #3293  by bmarlin
 Wed Feb 27, 2013 4:54 pm
I have been running very large experiments that take a few days to run. Murphy's law seems to interfere through either power outages or automatic updates which can cost me a couple of days of computer time. So I found some code using autohotkey and modified it to work great with SIMIO. autohotkey is a free download and easy to use. The below code runs a loop which hits {control S} on the SIMIO window if it is open every 10 minutes.

Persistent
;run a loop 100 times saving every ten minutes if your SIMIO file is open.
loop, 100
{
;save file every 10 minutes
MsgBox, Iteration number is %A_Index%.
setTimer, AutoSave, 6000000,on
AutoSave:
IfWinActive, ;name_of_simio_file_without_spfx_extension
Send {Blind}^s
return
}
return