Author Topic: ACADDOC.lsp - saving dwg  (Read 2798 times)

0 Members and 1 Guest are viewing this topic.

MSTG007

  • Gator
  • Posts: 2601
  • I can't remeber what I already asked! I need help!
ACADDOC.lsp - saving dwg
« on: August 03, 2018, 09:15:03 AM »
I am using the acaddoc.lsp to do some simple routine to batch some files. However on some of the dwgs when it saves (not all), it saves it as save4112.tmp file. Then the original dwg file is gone. Any idea?

Code: [Select]

(command "-layer" "set" "0" "")

(command ".zoom" "E")

(command "_.close" "");;Closes Drawing with Saving


So if I have a Plan Sheet1.dwg. it would save it as a save4112.tmp. Then the Plan Sheet1.dwg seice to exisit...

Civil3D 2020

ronjonp

  • Needs a day job
  • Posts: 7529
Re: ACADDOC.lsp - saving dwg
« Reply #1 on: August 03, 2018, 10:45:40 AM »
Are you running any other code at startup? That's some bad juju...


Also press F5 in the directory where the drawing should be saved. Sometime the directories on a network don't auto refresh.

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

MSTG007

  • Gator
  • Posts: 2601
  • I can't remeber what I already asked! I need help!
Re: ACADDOC.lsp - saving dwg
« Reply #2 on: August 03, 2018, 12:57:08 PM »
Yea I think I am... I have a routine via appload I use. I only use the acaddoc.lsp when I need to batch stuff. I think your right. well at least it makes sense.
Civil3D 2020

Crank

  • Water Moccasin
  • Posts: 1503
Re: ACADDOC.lsp - saving dwg
« Reply #3 on: August 03, 2018, 02:41:36 PM »
I think Acad quits before the save command has finished.

What you can try is replace CLOSE with QSAVE + QUIT .

If that doesn't work you can add a DELAY between QSAVE and QUIT .
Vault Professional 2023     +     AEC Collection

MSTG007

  • Gator
  • Posts: 2601
  • I can't remeber what I already asked! I need help!
Re: ACADDOC.lsp - saving dwg
« Reply #4 on: August 03, 2018, 02:48:55 PM »
So does that mean, as the file is saving (50%) or whatever, AutoCAD Quits, then instead of a dwg file is saved. A tmp file is saved then. Interesting. I like the delay idea...
Civil3D 2020

Crank

  • Water Moccasin
  • Posts: 1503
Re: ACADDOC.lsp - saving dwg
« Reply #5 on: August 03, 2018, 03:06:13 PM »
Normally, when you do a save:

-First a temp file is created.
-Then the .dwg file is renamed to .bak.
-The final step is that the .tmp file is renamed to .dwg

I suspect in your case, not all steps are performed.
Vault Professional 2023     +     AEC Collection

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: ACADDOC.lsp - saving dwg
« Reply #6 on: August 03, 2018, 03:08:40 PM »
I am using the acaddoc.lsp to do some simple routine to batch some files. However on some of the dwgs when it saves (not all), it saves it as save4112.tmp file. Then the original dwg file is gone. Any idea?

Code: [Select]

(command "-layer" "set" "0" "")

(command ".zoom" "E")

(command "_.close" "");;Closes Drawing with Saving


So if I have a Plan Sheet1.dwg. it would save it as a save4112.tmp. Then the Plan Sheet1.dwg seice to exisit...

your network is having issues
Be your Best


Michael Farrell
http://primeservicesglobal.com/