- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm trying to write a little autosave script. Despite all pros/cons for this idea, I'd like to know how to make it work.
One little advice was given here, but it doesn't seem to work for me.
By tweaking the code a bit, it looks like this:
If AutoSaveTrigger >= 100 Then AutoSaveTrigger = 0 savefile = MessageBox.Show("Do you want to save?", "Autosave", MessageBoxButtons.YesNo, MessageBoxIcon.Question) If savefile = vbYes Then ThisDoc.Save End If Else AutoSaveTrigger += 1 End If
and I assign it to parameter change. However, it doesn't do anything.
I think it has something to do with AutoSaveTrigger, but I can't put my finger on it. I dont' know if Inventor "forgets" this parameter value once the rule is fired.
Bonus question: would it be possible to do so that the rule runs every 15min instead of every 100 actions?
Thanks!
Edit: just a few thoughts from another thread:
- I know that there is a "save reminder", but that's not what I'm looking for
- I started with iLogic because I want this event to activate periodically, like 100 actions after or 15 min after the last save. I'm willing to switch to VB.net if it adds any benefit.
- If done in iLogic, I'd add the code to the template doc so that it's used in all parts, assemblies and drawings from now on.
Solved! Go to Solution.