AutoCAD DWG Export Automation Options

Since the Export Options dialog is not displayed when the program is driven from an automation script, an options string can be specified in the script. The string consists of comma-separated parameters, which specify the behavior of the various export options. A typical example would be:

"Defaults=1,FormatASCII=0,AllColorsSame=1"

This would set all export options to their default values, then indicate the DWG file will be written in binary format and that all colors will be the mapped to the default AutoCAD color.

Remarks

Boolean values within options strings are not equivalent to Booleans in Scripter BASIC. Use “1” instead of “True” and “0” instead of “False”.

Option

Action

Default

Description

FileCompatibility

33 = AutoCAD 2018

31 = AutoCAD 2013

29 = AutoCAD 2010

27 = AutoCAD 2007

33

Specifies which version of the DWG format is to be used for export.

FormatASCII

0 = Binary

1 = Text (ASCII)

1

File format of exported DWG file. The ASCII file format is larger than the DWG binary format, but is compatible with a wider variety of software programs.

MaxBitmapSizeInMB

N

10

For AutoCAD 2004 format, this option specifies the largest size allowed for an individual bitmap in the DWG file, in Megabytes. Any exported bitmap larger than this size, will have its resolution reduced so it does not exceed the maximum size.

AllColorsSame

0 = No

1 = Yes

0

Convert all colors to the default color.

AllStylesSame

0 = No

1 = Yes

0

Convert all line styles to the default line style.

AllWidthsSame

0 = No

1 = Yes

0

Convert all line widths to the default line width.

AllTextToAreas

0 = No

1 = Yes

0

Convert all text entities in the exported document to solid areas

FillSolidAreas

0 = No

1 = Yes

0

Fill solid area interiors.

UseSpatialInfo

0 = No

1 = Yes

0

Use ONLY spatial information. Only the basic geometry (lines, areas, text) will be written to the DWG file, and all line styles, colors, fills, and other attributes will be discarded.

ColorMapping

0 = Linear

1 = Weighted LUV

0

Choose the indexed color mapping as either weighted LUV export color mapping, or linear export color mapping.

RenderMarkers

0 = No

1 = Yes

1

Render marker symbols as lines and polygons. When set to 0, marker symbols are exported to the DWG file as points.

WriteLWPOLYLINE

0 = No

1 = Yes

0

Render both 2D and 3D objects as 2D LWPOLYLINE entities in the output DWG. When set to 0, 3D objects will be exported as 3D POLYLINE entities, and 2D objects will be exported as LWPOLYLINE entities. Must be 1 to write Z values.

WriteZ

0 = No

1 = Yes

1

WriteLWPOLYLINE must be set to 1 to choose whether to write Z values.

ScalingSource

0 = previously saved

1 = application-supplied

1

Use previously saved or application-supplied scaling source.

SaveScalingInfo

0 = No

1 = Yes

0

Save scaling parameters for later use.

PageLLX

N.N

 

Set application page rectangle lower left X value.

PageLLY

N.N

 

Set application page rectangle lower left Y value.

PageURX

N.N

 

Set application page rectangle upper right X value.

PageURY

N.N

 

Set application page rectangle upper right Y value.

FileLLX

N.N

 

Set scaling rectangle lower left X value.

FileLLY

N.N

 

Set scaling rectangle lower left Y value.

FileURX

N.N

 

Set scaling rectangle upper right X value.

FileURY

N.N

 

Set scaling rectangle upper right Y value.

See Also

AutoCAD DWG File Description

AutoCAD DWG Export Options Dialog

AutoCAD DWG Import Options Dialog

AutoCAD DWG Export Automation Options

Import Options String