Syntax Needed to SAVE to a R11/12 ASCII DXF File
Comments
-
Hello.
You could use something like:
(command "_.saveas" "_dxf" "v" "R11" 6 <file-path>)
R11 is the version.
6 is the decimal places of accuracy - 6 is the default value, you could use a pair of double quotes ("") instead.
There is also a Binary option available, I didn't use it here.0 -
Hi Virgil,
I appreciate your explanation.
Thanks,
Clint
0 -
You could also try DXFOUT
0 -
Thanks! However, we must save to a R11/12 ASCII DXF file format for compatibility purposes with production machine control programs.
Thanks,
Clint
0 -
@Clint2U, would the attached lisp file be of any use?
1 -
This will export the current drawing to dxf in R11 format with accuracy set to 6 decimal places
(defun C:DXF-R11 ( / DXF-fname)
;set the dxf filename based on the current drawing name and location
(setq DXF-fname (strcat (getvar 'DWGPREFIX)(vl-DXF-fname-base (getvar 'DWGNAME)) ".dxf"))
;Export the drawing to DXF R11 format with accuracy set to 6 decimal places
(command "._DXFOUT" DXF-fname "_V" "_R11" "6")
(prin1)
)1 -
I don't think there was any change in file format from AutoCAD R11 to R12. So DXFOUT to R11 or R12 should yeild the same result.
0 -
Again, I owe you. I appreciate your contribution, Jason.
0 -
Hi David,
Your generous code submission will benefit us and also contribute to my LISP education.
I noticed that a semi-colon must be added on what appears to be a comment line. Please confirm.
Thanks,
Clint
0 -
See the error as it appears in the command line.
Any suggestions?
Thanks,
Clint
0 -
@Clint2U, I copied it from another forum post, so it probably got word-wrapped and nobody noticed.
That is if you are referring to the word "necessary"?
Just edit it back to where it should be on the line above, it seems to work either way.
0 -
Of course! Thanks!
0