Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

open file , run command and close

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
E.S.7.9
8266 Views, 2 Replies

open file , run command and close

hi ,

 

i have approximately 100 dwg files in my folder , and i have to purge and audit all of those files  , is there any easy way or lisp for open files / run commands which i want / save & close file / open next dwg and the same procces for until finish all files ...

 

thank you for your help

2 REPLIES 2
Message 2 of 3
hmsilva
in reply to: E.S.7.9

I would suggest a script (.scr) file, and Autodesk's Scriptpro to process all dwg's.

 

EDIT: attached is a Sample.scr.txt, remove the .txt, using Scriptpro, your script don't nead to call the close command, the program will close the dwg and open the next one.

 

Henrique

EESignature

Message 3 of 3
Ajilal.Vijayan
in reply to: E.S.7.9

Also if you are using Acad 2013 or later version use accoreconsole.exe to run the script file.

 

To use accoreconsole, you need to create a *.bat file with the below line.

FOR %%f IN ("C:\dwgfiles\folder\*.dwg") DO "C:\Program Files\Autodesk\AutoCAD 2014\accoreconsole.exe" /i "%%f" /s "C:\myscript.scr" /l en-US

 

Edit the paths(highlighted in blue) as per your requirements.

  1. C:\dwgfiles\folder\ - This will be the path where your drawings are saved for batch processing.
  2. C:\Program Files\Autodesk\AutoCAD 2014\accoreconsole.exe - acccoreconsole.exe, file location in acad program files folder.
  3. C:\myscript.scr - the script needs to run on the files in step 1 (Use the script file which Henrique suggested)

Save the *.bat file anywhere you like, and double click on this bat file will start accoreconsole to process the drawings.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost