Drafting Techniques

Reply
*Peet, Steve
Message 1 of 5 (424 Views)

Making a Script to open and save multiple drawings

424 Views, 4 Replies
02-05-2003 04:37 AM
I am trying to make a script to open multiple drawings without buying a
add-on script program
I just wanted a script to plot multiple sheets, and inserting blocks at the
same insertion point in multiple drawings. I can get everything except how
to open, save then open another one.
Any help would be appreciated!

Thanks

Steve
*Yoder, S.
Message 2 of 5 (424 Views)

Re: Making a Script to open and save multiple drawings

02-05-2003 05:05 AM in reply to: *Peet, Steve
You need a DOS batch file for the last part. It's just an ASCII text
file you create with Notepad that has a '.bat' extension. In it you
place two lines:
FOR %%D IN (*.DWG) DO "[path]\[acadexe]" %%D /b "[path]\[script]"
END

Where:
[path] = full path to whatever, ie C:\Program Files\AutoCAD
[acadexe] = name of Autocad executable, ie aclt.exe for LT
[script] = name of the script file to run, ie plot.scr

Make sure your script has at the end (to save and close):
_quit
_y

Be sure your script functions with a single drawing when run manually
before continuing!

Now place the DOS batch file in the same folder as the drawings you want
the script to be run on (and remove any you do not want it to run on).
Next, close Autocad and open a DOS window and use the CD command to
change to the folder where the batch file is (tip: get the 'command
prompt here' power toy for quick right-click access). And finally just
type in the name of the DOS batch file to run it.

Enjoy,
Stef
--
mailto: yodersj@earthlink.net || Drafter, Leather-worker
http://www.flatmtn.com/cad/ || Dos, Win, LT
http://www.flatmtn.com/computer/ || Computer How-To

"Steve Peet" wrote in
news:069ED9F609CFCC134C0FC8E0553D2671@in.WebX.maYIadrTaRb:

> I am trying to make a script to open multiple drawings without buying
> a add-on script program
> I just wanted a script to plot multiple sheets, and inserting blocks
> at the same insertion point in multiple drawings. I can get everything
> except how to open, save then open another one.
> Any help would be appreciated!
*Saadallah, Dean
Message 3 of 5 (424 Views)

Re: Making a Script to open and save multiple drawings

02-05-2003 11:36 AM in reply to: *Peet, Steve
SCRIPTPRO, the freebie Migration Assistance tool you can get from
Autodesk:
http://support.autodesk.com/getDoc.asp?id=TS66201

--
Dean Saadallah
http://www.pendean.com
LT Express utilities
http://www.pendean.com/ltexpress
Expanded Links Pages
http://www.pendean.com/lt/links.htm
--
Distinguished Contributor
SMMASON
Posts: 314
Registered: ‎11-19-2003
Message 4 of 5 (424 Views)

Re:

02-06-2003 10:50 PM in reply to: *Peet, Steve
Been writing scripts since day on (7 years). I knew there had to be a way using DOS. The process of using the .bat is a bit slower, but it sames time writing the script. I believe I will be using this format from now on. Thanks for the info.
*Gaudette, Peter
Message 5 of 5 (424 Views)

Re:

02-21-2003 12:51 AM in reply to: *Peet, Steve
In my humble opinion the best all time ever script
file maker, Xtree Gold, DOS version.  Under the batch command
there are options for finding files from anywhere over the network, do a
couple of commands and save them back or somewhere else.  It didn't take
any longer to create a script for 10 or 1010 files.


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
Been
writing scripts since day on (7 years). I knew there had to be a way using
DOS. The process of using the .bat is a bit slower, but it sames time writing
the script. I believe I will be using this format from now on. Thanks for the
info.

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community