Help: Draw circles in multiple dwg files with batch process?

Help: Draw circles in multiple dwg files with batch process?

Anonymous
Not applicable
451 Views
2 Replies
Message 1 of 3

Help: Draw circles in multiple dwg files with batch process?

Anonymous
Not applicable

Hi everybody,

 

I'm very new to batch process. I've tried to make my own simple batch process to draw circles in multiple files.

The process will draw a circle at the origin of each drawing. When I ran the Autolisp and Script file, they worked well.

But when I ran bat file with script and lisp, the batch process didn't work. 

Could someone help me?

 

Thank you!.

 

The Autolisp code:

(defun c:drawcircle(/ pt)
  (setq pt '(0 0 0))
  (command "_.circle" "_non" pt 5)
  (princ)
  ) ; defun

 

The script:

(load "c:\\datafiles\\test\\drawcircle.lsp")
drawcircle
QUIT
Y

 

The batch:

FOR %%f in (c:\datafiles\test\dwg\*.dwg) do start /wait C:\”Program Files”\”Autodesk”\”AutoCAD 2013”\acad.exe “%%f” /b  c:\datafiles\test\drawcircle.scr

 

0 Likes
Accepted solutions (1)
452 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
Accepted solution

The batch process didn't work correctly because of wrong syntax.

The batch file should be as:

 

FOR %%f in (c:\datafiles\test\dwg\*.dwg) do start /wait C:\"Program Files"\Autodesk\"AutoCAD 2013"\acad.exe “%%f” /b  c:\datafiles\test\drawcircle.scr

 

And the script from my 1st post will quit without saving ("N" as "No" respond to "Quit without saving?"). So, the script should be:

 

(load "c:\\datafiles\\test\\drawcircle.lsp")
drawcircle
QUIT
N

 

Hope this will be useful to somebody else.

 

Message 3 of 3

hmsilva
Mentor
Mentor

Hi maikhanhmst,

thank you for sharing the correct syntax!

 

Henrique

EESignature

0 Likes