Author Topic: Incremental Save As  (Read 12617 times)

0 Members and 1 Guest are viewing this topic.

Diněsaur

  • Certified Bovine Scat Distributor...I lay it on THICK
  • Needs a day job
  • Posts: 5424
  • But I don't WANT a Day Job
Re: Incremental Save As
« Reply #30 on: July 13, 2007, 11:41:42 AM »
. . . but then again I don't use Civil 3D.
You can take great comfort in that.  Using Civil 3D is kind of like working with a 14 year old son . . . it has incredible power and can make the task at hand much easier and sometimes even possible, but this potential is evenly matched with a full measure of stubbornness, attitude and immaturity that taxes one's patience to its limits.
I will try adding the command to a few of the more volatile routines and see what happens.
Stephen R. Sherrill,
The Diněsaur
Civil 3D Specialist Emeritus

YAY ME !!!  I made it out alive !

T.Willey

  • Needs a day job
  • Posts: 5238
Re: Incremental Save As
« Reply #31 on: July 13, 2007, 11:46:03 AM »
Well Din0, all I can say is that I hope you are pleasantly surprised.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Incremental Save As
« Reply #32 on: July 13, 2007, 11:55:47 AM »
At this point I am still averse to using Vault.  Mostly due to it being more or less about version control than project management as in Land Desktop. Secondly due to the additional administrative overhead. See threads regarding needing to 'migrate' 2007 Vault into 2008 Vault headaches in this and other Forums.


I sorely wish that Autodesk would NOT have made it an either nor option to use Vault OR the Native Project mgt functions as they existed in earlier versions of C3D.  I can understand them trying to get the most out of their investment in creating Vault, only the original functionality was fine and with far less overhead to implement and administer than Vault ever will be.
Be your Best


Michael Farrell
http://primeservicesglobal.com/

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Incremental Save As
« Reply #33 on: July 13, 2007, 11:57:49 AM »
Speaking of cats ...


Say Kerry, how about a brief overview of the who, what, when, where of the code that you posted?
Be your Best


Michael Farrell
http://primeservicesglobal.com/

John Mayo

  • Guest
Re: Incremental Save As
« Reply #34 on: July 13, 2007, 12:06:18 PM »
What's that smell, did I step in something?

Thank you all for the replies. I understand the concerns with Vault. I too have many wishes & I have had my patience pushed in all kinds of directions... ;)

John

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Incremental Save As
« Reply #35 on: July 13, 2007, 02:06:24 PM »
What's that smell, did I step in something?

Thank you all for the replies. I understand the concerns with Vault. I too have many wishes & I have had my patience pushed in all kinds of directions... ;)

John


Care to share what your issues both good and bad are with Vault?  C'mon we can handle the truth. :evil:
Be your Best


Michael Farrell
http://primeservicesglobal.com/

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Incremental Save As
« Reply #36 on: July 13, 2007, 09:51:39 PM »
Speaking of cats ...


Say Kerry, how about a brief overview of the who, what, when, where of the code that you posted?

It's nothing special Michael.
Just Saves the File then copies the file to a folder \\DRAWINGArchive\\.. under the current location, appending the file name with a datestamp. We use it for archiving our model drawings. Also handy when you need to demonstrate to 'someone' that the details they are trying to change were incorporated and finalised at a specific time .. also great for before and after snapshots.

It could easily be modified to dump the archive into the same folder as the original if that was ayour preference.

The when and where, if important, is here a couple of times and at CadVault a couple of times.

The Archive folder looks something like this :-
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

--> Donate to theSwamp<--

andrew_nao

  • Swamp Rat
  • Posts: 566
Re: Incremental Save As
« Reply #37 on: July 16, 2007, 08:39:00 AM »
I use this maybe you can modify it to suit you needs

Code: [Select]
(DEFUN c:nsave ( / dname dpref bdir dbac)

(setq dname (getvar "DWGNAME"))
(setq dpref (getvar "DWGPREFIX"))
(setq bdir (strcat "C:/ACADBACK/" dname))
(command "Qsave")
(setq dbac (vl-file-copy (getvar "savename") bdir))
(if (= dbac nil)
(progn
(vl-file-delete bdir)
(vl-file-copy (getvar "savename") bdir)
)
)
(setq sname (strcat "File Saved To "dpref dname))
(setq sname1 (strcat  sname "\nFile Saved To "bdir))
(ALERT sname1 )

;(prompt "\n\nFile Saved...")
;(princ bdir)
;(prompt "\n\nFile Saved...")
;(princ dpref)
;(princ dname)
(princ)
);END QSAVE

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Incremental Save As
« Reply #38 on: July 16, 2007, 11:03:19 AM »
Andrew, same questions, how about a brief overview of the who, what, when, where of the code that you posted?
So that someone might know what it could do for them to decide if it is suitable for their needs.
Be your Best


Michael Farrell
http://primeservicesglobal.com/

andrew_nao

  • Swamp Rat
  • Posts: 566
Re: Incremental Save As
« Reply #39 on: July 17, 2007, 01:31:37 PM »
it saves the current drawing you are in and then it also makes a backup to another directory

RickO

  • Guest
Re: Incremental Save As
« Reply #40 on: July 23, 2007, 01:53:12 PM »
Invalid dwg error disaster Protection.
Thanks for the Save your BUTTon, I wrote it up for mass consumption, with screen shots, etc.

dfarris75

  • Guest
Re: Incremental Save As
« Reply #41 on: December 13, 2007, 09:48:18 AM »
ok, the official name is SaveMyA**,

only now that code doesn't work in the button....what did we break?
If you just want it in a button, then no need to name it, but use this code instead.
Code: [Select]
(progn
 (setq NewPath (strcat (getvar "dwgprefix") (vl-filename-base (getvar "dwgname")) "-Bak.dwg"))
 (command "_.qsave")
 (if (findfile NewPath)
  (command "_.save" NewPath "_yes")
  (command "_.save" NewPath)
 )
 (setq NewPath nil)
)
I am using this now and it works, however I've noticed on multiple occasions after a save that while I am in the original *.dwg the toolspace shows that the *BAK.dwg file is the one opened. Has anyone else noticed such a glitch?

deegeecees

  • Guest
Re: Incremental Save As
« Reply #42 on: December 13, 2007, 10:40:59 AM »
Thats because thats the name it was saved as LAST.

If you extend the function to save it back to its original name as the last save, that wouldn't happen.

T.Willey

  • Needs a day job
  • Posts: 5238
Re: Incremental Save As
« Reply #43 on: December 13, 2007, 11:12:34 AM »
ok, the official name is SaveMyA**,

only now that code doesn't work in the button....what did we break?
If you just want it in a button, then no need to name it, but use this code instead.
Code: [Select]
(progn
 (setq NewPath (strcat (getvar "dwgprefix") (vl-filename-base (getvar "dwgname")) "-Bak.dwg"))
 (command "_.qsave")
 (if (findfile NewPath)
  (command "_.save" NewPath "_yes")
  (command "_.save" NewPath)
 )
 (setq NewPath nil)
)
I am using this now and it works, however I've noticed on multiple occasions after a save that while I am in the original *.dwg the toolspace shows that the *BAK.dwg file is the one opened. Has anyone else noticed such a glitch?
Thats because thats the name it was saved as LAST.
On my system that doesn't matter.  If you use the save command, and give it a name, it will save the file to that name, but keep the original one open still.  Maybe there is a system variable or something that is setup different.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

hudster

  • Gator
  • Posts: 2848
Re: Incremental Save As
« Reply #44 on: December 13, 2007, 11:18:06 AM »
save the file to somewhere on your server where everyone can access it, then do this

change the button command to read ^C^C(load "<yourserver location>/savemya**.lsp");savemya**;

that should work.
Revit BDS 2017, 2016, 2015, 2014, AutoCAD 2017, 2016, Navisworks 2017, 2016, BIM360 Glue