todouble22 发表于 2022-7-6 12:26:53

swapping of responses??what have you highlighted several times?I posted what I am using for all the files, I have tried it with different SDI modes , I'll try it with the resume workaround and give it a go.Thanks DBroada!

dbroada 发表于 2022-7-6 12:29:54

the swapping of "do you want to save changes" bit. Sorry, too much rum to make sense.

Freerefill 发表于 2022-7-6 12:32:51

I wrote a LISP for batch processes, it'll take just about all comers and won't require a batch file, plus it writes its own scripts. Check my signature for the link.

BIGAL 发表于 2022-7-6 12:35:32

The problem guys is your overlooking the simple answer it being run by a batch file !
 
A batch file runs outside autocad from the operating system command line once you start the loop the batch file opens a session of autocad and it expects you to close it as well, hence why quit works and not close.
 
The easier way is to stay inside autocad and use a script to loop through the drawings and yes use close not quit. We have done for 100+ drawings no problems.
 
A couple of extra real help full tips after you create your dir *.dwg >mydwgs.txt file use WORD to edit it, remove the junk till you get just filenames only use "hold alt key" and use mouse for vertical selection then delete, an unknown fact is that you can find/replace the end of line with something new uselly my script commands.
 
eg
mydwg1.dwg
mydwg2.dwg etc
 
find replace g^p   with g zoom e domylisp^p
 
ie   
mydwg1.dwg zoom e domylisp
mydwg2.dwg zoom e domylisp
also add blank line at top ^preplace ^oopen            (space after n)
 
open mydwg1.dwg zoom e domylisp
open mydwg2.dwg zoom e domylisp
 
delete blank line
save as a script
 
Hope this helps. it only takes a couple of minutes to edit the dwg txt file.

todouble22 发表于 2022-7-6 12:39:21

You are correct that I would like to run this outside of autocad well as I stated before I have it open Autocad but as you say with the batch file it runs externally and in the program it quits and then restarts with the next drawing in the folder.I posted the code in this thread, maybe it would be helpful if I commented it as to what I was attempting to do?and bid al thanks for your help here but I guess I got a lil lost as to what you were explaining with your script file.

todouble22 发表于 2022-7-6 12:39:44

is it a portion of the final blitz package?

dbroada 发表于 2022-7-6 12:45:06

pretty much what I was trying to say but I prefer to construct my script using excel 
just one note, if you use dir *.dwg > mydwgs.txt /b you will NOT get any of the junk, just the filenames.

todouble22 发表于 2022-7-6 12:46:35

I write all my scripts in notepad?what are the benefits in doing it in excel?..ssearching google now...

Lee Mac 发表于 2022-7-6 12:50:49

I would agree with BigAl on this one - is it mandatory that you run the script from outside of AutoCAD?
 
Why not just create a script file and run it from within ACAD?
 
You could even use a LISP to write the script for you

todouble22 发表于 2022-7-6 12:52:20

No its not mandatory at all I guess I was just playing around with what I knew the most.Basically what I want to do is be able to process multiple drawings by purging them to minimize file size before transmittal or even just to reduce the file size.The way that I have it it opens autocad, opens the drawing , runs the script to purge and then the lisp to save it with the same name in an "updated" folder.The problem is that it opens autocad for every drawing in the folder performs the task shuts down and goes on to the next.I am more than interested in doing a lisp for this and I am eager to learn.
页: 1 [2]
查看完整版本: question about batch, lisp, sc