Script Files
Script Files
(OP)
Hi,
I know nothing about script files but I think I may be able to use them for a particular thing I do.
I would like to convert multiple dxf to dwg files.
What I would like to do is explained below:
1. Open DXF
2. Zoom to extents
3. Save as DWG
4. Close the file
The quantities of files is always quite high, around 200-400 so an automated method of doing this would be great.
Thanks
Hayden
I know nothing about script files but I think I may be able to use them for a particular thing I do.
I would like to convert multiple dxf to dwg files.
What I would like to do is explained below:
1. Open DXF
2. Zoom to extents
3. Save as DWG
4. Close the file
The quantities of files is always quite high, around 200-400 so an automated method of doing this would be great.
Thanks
Hayden





RE: Script Files
I think I answered you before on a similar topic but here goes.
If you can write a script to convert one drawing from DXF to DWG...you can then apply that script (as well as others)
to many drawings, using a FREEWARE program found at the following web site: http://www.ezscriptpro.com
It was written exactly for the uses you described.
Regards,
RE: Script Files
I Have started using ezscript and think it's great. I know nothing about scripts though. Do you know if yu can place boolean statements (if, then...) throughout the script?
RE: Script Files
To answer your question, you cannot do For...Next loops in an AutoCAD script, but you can in a LISP routine which EZscript-Pro also supports.
The key to using EZscript-Pro is to get your script/LISP to run inside autocad first, then load it into EZscript-Pro for operation on many drawings.
Alternately you can repeatedly call the same script (slightly modified each time))to operate on a drawing(s).
As to your earlier post, I will post a script that will open a DXF..plot it..then save it as a .dwg file.
Regards,
RE: Script Files
zoom e
-plot
y
Model
(INSERT PRINTER NAME HERE)
(INSERT PAPER SIZE HERE)
I
L
N
e
F
center
Yes
.
n
n
n
y
y
_saveas
r13
Space
Space
Don't forget the spaces at the end. They act the same as the ENTER key.
EZscript-Pro will add the open and close statement..do not add them to your script. After clicking the "make script" button, the resulting script that will run on AutoCAD will be c:\ezscript\ezscript.scr.
Regards,
RE: Script Files
, this is nesseserly to import all entity's from the DXF, and keep in mind that long file names must have double quote's around it. If you useing a2000 or higher set the SDI(Single Document Inerface) enviroment to 1 before you start, to ensure processing one file at the time.
Example script:
FILEDIA 0
NEW .
OPEN "dxf long file name"
ZOOM E
SAVE
Enjoy
P.S.
I have this home made routine VBA, send me your email and I posted to you.