Jump to content
Steven P

Faster saving in a script

Recommended Posts

Steven P

Good afternoon,

 

Last week I had 1000+ drawings to process (a simple purge on them all). What took the time was saving each drawing - is there a fast method in a script (or a LISP )to save a drawing

 

(1000 drawings at 3 seconds a save per drawing = about 50 minutes just for saving)

 

 

The second longest thing was opening a drawing but I don't think I can do much with that. I would prefer to uses something that wasn't modifying system variables, though I can cope with them if it makes a difference

 

Thanks

Share this post


Link to post
Share on other sites
pendean

Question: what are you doing this for exactly?

 

Also let everyone here know which version of AutoCAD (or LT) are you using.

Share this post


Link to post
Share on other sites
steven-g

Posting the script would help someone spot if there is a reason why things are slow, maybe change the order around or use an alternative command.

Share this post


Link to post
Share on other sites
Steven P

Thanks for your help so far. I haven't tried any of them yet though - that's a job for next week

 

However...

Saveall - yup, but no, I wasn't wanting a saveall in case I had other drawings opened that didn't need saving

 

I'm using AutoCAD 2018,

 

Pretty much the script is:

Open a file using the '_.OPEN ' command

- run a couple of LISPS, for example 'purgea' - my purge all lisp

save using '_.QSAVE'

Close the file using 'close' command

 

Open the next file in the list

 

 

I tend to do them this way because opening, saving and closing produces a .bak file just in case. It seems to do the LIPS bits quickly in the script and outside of the script, just the save was pretty slow in comparison... so any hints where to look?

Share this post


Link to post
Share on other sites
pendean

Where you are saving to and what format dwg file you are aiming for some of the many are reasons for slow saves if you've ruled out all of the other reasons like your purge routines etc.

 

Care to tell us more, in a lot more detail? There is no magic bullet solution,this one may be local to you alone.

Share this post


Link to post
Share on other sites
iconeo

I used to use a utility called batchindatabase which was perfect for this. It was free but is now $40. Still though, you'd make it up in one session.

 

If all the drawings you need to modify are in the same directory you could use the acaddoc.lsp trick.

 

Sent from my Pixel 2 XL using Tapatalk

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×