Jump to content

Welcome to eMastercam

Register now to participate in the forums, access the download area, buy Mastercam training materials, post processors and more. This message will be removed once you have signed in.

Use your display name or email address to sign in:

Backup VB script


Recommended Posts

Could someone please email me the VB script called "SaveBackup-Mick.zip" from the VB folder on the FTP? I can't access the FTP right now and we've had a lot of problems lately with MC shutting down and giving us a 0kb file. curse.gif

 

Thanks.

 

Thad

Link to comment
Share on other sites

quote:

its in the "c-hooks" folder.

Mark,

 

Thanks for the correction. The thread I found while searching said it was in the VB folder. Oh well, problem solved. cheers.gif

 

Oh, and Jay.....I want my money back! tongue.giftongue.gifwink.gifbiggrin.gif

 

Thad

Link to comment
Share on other sites
  • 5 months later...

Did a search and found this thread . . .

 

I cannot access the FTP site--IT guy says "no". Someone please send me the VB script that saves your file with a date-time stamp. I think it was called "savebackup.vbs". I had it at the last place I worked, and they will not release the file to me. Shame on me for not making a copy.

 

Thanks

cheers.gif

Link to comment
Share on other sites

Thad:

 

Thanks, this is it. I did have to change the data path, but I imagine everyone will do this.

 

Doug,

 

What I do is assign the key 'F11' to run the script. Just go to SCREEN-CONFIGURE and under the tab 'toolbar/keys' find SAVEBACKUP.VBS in the list, then click the radial button ADD, then hit FIND KEY. Next hit the F11 key, click OK and your now have a HOT KEY for saving the file with a date-time stamp. It doesn't overwrite any files, but allows you to go back n time and pick the GOOD file.

 

HTH cheers.gif

Link to comment
Share on other sites

Doug,

 

Code Breaker has the right idea on assigning a quick key for it. In case you didn't want to do that, you could always launch it from the VB Editor chook. Hit Alt+C to access the chooks and it's called something like mcvb(something).dll. In fact, you'll have to use the VB Editor to alter the data path to your liking.

 

Thad

Link to comment
Share on other sites
  • 1 month later...

I don't have that line. I do have this...

 

strBackupPath = "C:TEMP"

 

so I changed it to "C:mcamxmcxMillback up" and it does something, you see the little saving nci box blink really fast, but when I open up the back up folder it's still empty.

 

Ok I found it, it is just getting dumped in the mill folder. How do I get it into the back up folder?

Link to comment
Share on other sites

g huns,

 

I don't know why, as I'm still pretty new to scripts, but what if your back-up folder name is 1 word instead of 2? (ie rename it Backups)

I had the same problem and eliminating 2 word folder names solved it. It may have something to do with how strBackupPath is being used within the script, too. Maybe some of our script gurus will chime in here.

 

HTH

scott

Link to comment
Share on other sites

quote:

I "assume" that this has not been done over for X yet and it only runs in V9?


The script runs fine on my computer in X SP1 Update 3 without any modifications. Like Code_Breaker mentioned, the only line you should ever need to modify is the constant at the top that looks like this:

 

code:

Public Const DEF_BACKUP_DIR = "C:Backup"  ' -- Edit to your taste

It's the directory of where the backup will be stored. You could make it looks like this:

 

code:

Public Const DEF_BACKUP_DIR = "C:My Stuff"  ' -- Edit to your taste

or this:

 

code:

Public Const DEF_BACKUP_DIR = "D:StuffJunk"  ' -- Edit to your taste

or this:

 

code:

Public Const DEF_BACKUP_DIR = "A:"  ' -- Edit to your taste

Or any other valid path.

 

quote:

I don't have that line. I do have this...

 

strBackupPath = "C:TEMP"

 

so I changed it to "C:mcamxmcxMillback up" and it does something, you see the little saving nci box blink really fast, but when I open up the back up folder it's still empty.

 

Ok I found it, it is just getting dumped in the mill folder. How do I get it into the back up folder?


Don't modify the contents of the strBackupPath variable in the Main() subroutine. The script stores the full path to the backed up file based on the concatination of the aforementioned DEF_BACKUP_DIR constant (which contains the backup directory of your choosing), the filename of the MCX file you have open, and a date/time stamp.

Link to comment
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
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.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.

Join us!

eMastercam - your online source for all things Mastercam.

Together, we are the strongest Mastercam community on the web with over 56,000 members, and our online store offers a wide selection of training materials for all applications and skill levels.

Follow us

×
×
  • Create New...