Author Topic: autocad 2019 propmpting for dwg recovery when opening dwgs  (Read 7320 times)

0 Members and 1 Guest are viewing this topic.

kdub_nz

  • Mesozoic keyThumper
  • SuperMod
  • Water Moccasin
  • Posts: 2132
  • class keyThumper<T>:ILazy<T>
Re: autocad 2019 propmpting for dwg recovery when opening dwgs
« Reply #15 on: May 08, 2018, 07:10:50 PM »
i do not get a recovery prompt if i dont use my custom code.
I have used this custom command for a few years. never been an issue till the new version
Andrew...

Why do you need the ver.20 check in the code?
What dwg-version are you saving your files to in R2019?

It's appears either no one here has R2019 or no one wants to try your code on their PC: are you simply trying to save your file in two locations at the same time?

The check for version >=20 is only for usage of command-s
Called Kerry in my other life
Retired; but they dragged me back in !

I live at UTC + 13.00

---
some people complain about loading the dishwasher.
Sometimes the question is more important than the answer.

kdub_nz

  • Mesozoic keyThumper
  • SuperMod
  • Water Moccasin
  • Posts: 2132
  • class keyThumper<T>:ILazy<T>
Re: autocad 2019 propmpting for dwg recovery when opening dwgs
« Reply #16 on: May 08, 2018, 07:14:13 PM »
This works for me in vanilla 2019
Code - Auto/Visual Lisp: [Select]
  1. (defun c:nsave (/ activedoc docfullname backuppath archivename)
  2.         backuppath "C:\\ACADBACK\\"
  3.   )
  4.   (if (zerop (getvar "dwgtitled"))
  5.     (progn (initdia)
  6.            (if (>= (atof (getvar "acadver")) 20.0)
  7.              (command-s ".saveas")
  8.              (command ".saveas")
  9.            )
  10.     )
  11.     ;; else it's already named , so
  12.     (vla-save activedoc)
  13.   )
  14.   (if
  15.     (and
  16.       (not (zerop (strlen (setq docfullname (vla-get-fullname activedoc)))))
  17.       (or (vl-file-directory-p backuppath) (vl-mkdir backuppath))
  18.       (setq archivename (strcat backuppath (vl-filename-base (vla-get-name activedoc)) ".dwg"))
  19.     )
  20.      (progn (if (findfile archivename)
  21.               (vl-file-delete archivename)
  22.             )
  23.             (vl-file-copy docfullname archivename)
  24.      )
  25.      ;; else
  26.      (alert "Ooooops. Unable to copy or deternine  Filename.")
  27.   )
  28.   (prompt (strcat "\n\nFile Saved..." archivename))
  29.   (prompt (strcat "\n\nFile Saved..." docfullname))
  30.   (princ)
  31. )
  32.  

added: OP original code modified to suit the way my brain works.

« Last Edit: May 08, 2018, 07:18:06 PM by kdub »
Called Kerry in my other life
Retired; but they dragged me back in !

I live at UTC + 13.00

---
some people complain about loading the dishwasher.
Sometimes the question is more important than the answer.

andrew..

  • Newt
  • Posts: 24
Re: autocad 2019 propmpting for dwg recovery when opening dwgs
« Reply #17 on: May 09, 2018, 02:42:24 PM »
Post the code, let's all have a look at it.

The code is here : http://www.theswamp.org/index.php?topic=54165.msg587819#msg587819

andrew: I meant to ask ;
What happens if you add Audit the drawing after you save it with your routine?

and, are you still using the same routine?
dont know. I havent thought about it.
How would i add that in?

andrew..

  • Newt
  • Posts: 24
Re: autocad 2019 propmpting for dwg recovery when opening dwgs
« Reply #18 on: May 09, 2018, 02:44:22 PM »
i do not get a recovery prompt if i dont use my custom code.
I have used this custom command for a few years. never been an issue till the new version
Andrew...

Why do you need the ver.20 check in the code?
What dwg-version are you saving your files to in R2019?

It's appears either no one here has R2019 or no one wants to try your code on their PC: are you simply trying to save your file in two locations at the same time?
check for versions because there are a few in the office who refuse to leave R2014
and yes the code is saving the dwg in 2 locations at the same time

andrew..

  • Newt
  • Posts: 24
Re: autocad 2019 propmpting for dwg recovery when opening dwgs
« Reply #19 on: May 09, 2018, 02:46:21 PM »
Lisp works fine here in R2019 as well: wonder what other settings Andrew.. has that we do not.

if no one else is getting the recovery prompt. it has to be a setting somewhere else thats triggering it.

i appreciate the feedback now i will have to hunt down the cause.