Author Topic: CamBam AutoSave plugin  (Read 2777 times)

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 4622
    • View Profile
CamBam AutoSave plugin
« on: January 19, 2019, 14:50:00 pm »
As requested here; http://www.cambam.co.uk/forum/index.php?topic=7815.msg62600#msg62600

Please find attached version 1.0 of the "AutoSave" plugin.

This plugin automatically saves the current CamBam file without user intervention to a location and at time intervals set by the user. It creates multiple saves as described below.

Tested on CamBam 0.9.8 and 1.0 under Windows

I have to say this;

Disclaimer: the decision to use this plugin is yours, I cannot accept liability for any damages or loss of date caused as a result of using it.

Having said that I've tested it for a while now and it's working as planned.


The plugin does not interfere with standard File->Save and File->SaveAs functions so use these as you normally would.

1. Install the plugin as normal whereupon a new entry will appear in CamBam's 'Plugin' menu.
    "AutoSave"
The plugin is 'enabled' by default on the first run when CamBam starts.

2. Use the form that pops up via, Plugins->AutoSave, to set
Interval between AutoSaves (in minutes 1 to 120)
path to the AutoSave folder (allows to also create a new folder)
Enable/disable the plugin

These settings are saved in Windows' Registry

3. Saving a CamBam file is not trivial (not for me anyway) so because it's tried and tested I used the internal method that CamBam employs when you do a normal, File->Save or File->SaveAs
This method takes care of, multiple backup files, overwriting, adding new files.
It uses the setting in Tools->Options->File Backups.
If for example you have this set to 3 then the AutoSave will create 4 files, the 'real' file and 3 backups and it will overwrite these files as time progresses so you end up with the 4 most recent versions of the cb file.

4. AutoSave file naming convention is, the CamBam filename + "_Autosave.cb"
Example: if your cb is called, "MyCamBamFile1.cb" then the AutoSave file will be called, "MyCamBamFile1_AutoSave.cb"

5. The plugin issues status messages in CamBam's bottom log window





« Last Edit: January 19, 2019, 14:56:50 pm by EddyCurrent »
Made in England

Offline Bubba

  • CNC Jedi
  • *****
  • Posts: 3085
    • View Profile
Re: CamBam AutoSave plugin
« Reply #1 on: January 19, 2019, 19:22:10 pm »
Downloaded and take for spin. Meanwhile, THANK YOU for this plugin.
My 2¢

Win10 (64 bit, CB(1.0)rc 1(64 bit) Mach3, ESS, G540, Endurance Laser.

Online lloydsp

  • CNC Jedi
  • *****
  • Posts: 8394
    • View Profile
Re: CamBam AutoSave plugin
« Reply #2 on: January 19, 2019, 21:32:11 pm »
Yes, Eddy!  Thanks for such good work!

Lloyd
"Pyro for Fun and Profit for More Than Fifty Years"

Offline pixelmaker

  • CNC Jedi
  • *****
  • Posts: 1799
    • View Profile
    • pixelmaker
Re: CamBam AutoSave plugin
« Reply #3 on: January 20, 2019, 14:38:59 pm »
I get an error message with the plugin. The problem seems to occur when there are spaces in the memory path. Then the filename is also changed, which doesn't make sense.

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 4622
    • View Profile
Re: CamBam AutoSave plugin
« Reply #4 on: January 20, 2019, 14:47:30 pm »
I never have spaces in the path so I'll have a look to see what the issue is.

You have a leading space before the word "cambam" in that path, is a leading space in path name valid ?
Made in England

Offline lernincnc

  • Droid
  • **
  • Posts: 98
    • View Profile
Re: CamBam AutoSave plugin
« Reply #5 on: January 20, 2019, 15:21:28 pm »
EddyCurrent - I downloaded your plugin yesterday.  Works great!  Thank you. 

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 4622
    • View Profile
Re: CamBam AutoSave plugin
« Reply #6 on: January 20, 2019, 17:45:03 pm »
Thanks lernincnc   :)

Ralph,

I had to used the DOS prompt to create a directory with a leading space, or I could have typed it into the AutoSave form.
It's not so much about a path having a space but more to do with, does the specified path exist ?

Also a filename must not be part of the path, it should point to a directory (folder) only. The filename comes from the CamBam file.

I have updated the plugin (but not released it yet) so that it checks if the path exists and if not, a message is shown then the plugin is disabled.
If a path is typed into the form text box manually, then it should be possible for the plugin to create that directory but that is something I do not want it to do. If a new folder is required use the "Select AutoSave Folder" button on the form and create a new folder from there.
« Last Edit: January 20, 2019, 17:52:50 pm by EddyCurrent »
Made in England

Offline pixelmaker

  • CNC Jedi
  • *****
  • Posts: 1799
    • View Profile
    • pixelmaker
Re: CamBam AutoSave plugin
« Reply #7 on: January 20, 2019, 21:13:43 pm »
hello eddy
as usual on the Mac I sort directories by spaces before the name. I had selected a directory with spaces and the plugin cannot make a backup copy of this directory. Instead I got the error message and the file name was extended by an "_Autosave" for every backup that was not made.

If you know this and pay attention, the plugin works fine.
I would prefer that the backup copies are always created at the location of the file, but I can also arrange with a given folder.
Thanks for the plugin.


ralf

Offline Bubba

  • CNC Jedi
  • *****
  • Posts: 3085
    • View Profile
Re: CamBam AutoSave plugin
« Reply #8 on: January 21, 2019, 18:49:37 pm »
Just tried this plugin, work as expected.. AWESOME JOB EDDY! Thanks.
My 2¢

Win10 (64 bit, CB(1.0)rc 1(64 bit) Mach3, ESS, G540, Endurance Laser.