AutoCAD DXF Import Automation Options

Since the Import 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 import options. A typical example would be:

 "Defaults=1,Color3=0;0;255"

This would first set all import options to their default values, then set the color associated with DXF Color Table entry #3 to Blue. All entities associated with Color Table entry #3 will be Blue. The DXF Color Table contains 255 entries (1-255).

Option Action Default Description
ApplyViewAngle 0 = No
1 = Yes
0 Apply the view angle from the DXF file (if any) to the coordinates during import.  Only applies if the DXF file being imported has a defined view angle.
SkipPaperspace 0 = No, import "paper space" entities
1 = Yes, skip "paper space" entities
0 Skip importing any "paper space" entities in the DXF drawing. "Model space" entities are always imported.

Color

N=R;G;B

See below for default color table

Any color in the DXF color table may be altered by using a ColorN option where N is the color number of the color to be changed.  The R, G, and B values specify the color channel saturations for each of the red, green, and blue channels respectively, and each must be between 0 and 255. For example:  To set color number 2 to white, the option would be Color2=255;255;255. Multiple ColorN options may be given, one for each color.

 

The first seven colors in the default Color Table are:

Color # R;G;B Values Color
1 255;0;0 Red
2 255;255;0 Yellow
3 0;255;0 Green
4 0;255;255 Cyan
5 0;0;255 Blue
6 255;0;255 Magenta
7 0;0;0 Black

Import Messages

The following messages may appear while attempting to import .DXF files.

ClosedIncomplete Entity

Some vital groups are missing from an entity in the DXF file. Make sure the layer and other required groups are present.

ClosedCouldn't find a block to insert

The program attempted to insert a block while the latter couldn't be found. Make sure the format of the BLOCKS section is correct, and the appropriate block is available.

ClosedWarning: 3-D extrusion not supported

The imported drawing contains one or more extruded objects which may not display properly after import. The DXF import filter software does not support the extrusion of two-dimensional objects to three dimensions within a DXF file. Click Yes to import the objects. Objects may appear incorrectly. Click No to import the .DXF file without any objects that contain an extrusions.

See Also

Import - Automation

AutoCAD DXF File Description

AutoCAD DXF Import Options

AutoCAD DXF Export Options

AutoCAD DXF Export Automation Options