AutoCAD DXF Export Options

For information on how to use Help, press F1 or choose Using Help from the Help menu.

The Export Options dialog allows you to specify options which determine how information in the file is exported.

When exporting, the application specifies coordinates in Page Units (inches or centimeters) as indicated on the document rulers.  You may want the coordinates offset and/or scaled in the DXF file so the image will overlay a base map or site drawing when the DXF file is imported into AutoCAD (or some other program).

This is accomplished by specifying the corner points of a rectangle (in Page Units) in the application document and the corner points of a rectangle in the desired DXF file units.  The document coordinates will be offset and/or scaled so the corner points of the document rectangle will have the desired DXF coordinates.  Checking Save scaling info will cause the scaling information to be stored for future use.

Scaling information can be retreived from two sources.  Saved will reload previously saved values.  Application will load scaling info calculated by the application.  The application provides potentially useful scaling info whenever possible.  If SURFER detects an unrotated Base, Contour or Surface map object that is viewed from directly overhead (Tilt = 90 degrees) is the only object being exported, it retrieves the (X,Y) data extents from the map and makes those the DXF scaling rectangle.  Otherwise, the application sets the scaling rectangles so the DXF coordinates will be the same as the document page units.

The Defaults button sets all buttons and checkboxes to default conditions.  The scaling rectangles will, in turn, be reloaded with values from the default scaling source.

Choose ASCII or Binary to specify the format of the exported DXF file.  See File Description for information on the organization of DXF files.

Choose All lines same color if you don't want an AutoCAD color number (1-7) assigned to your lines.  The default color for the layer will be used instead.  All exported graphical entities are assigned to a layer named GSLAYER.

The AutoCAD program's behavior when importing DXF files (via the DXFIN command) is different depending on whether the AutoCAD drawing file (.DRW) is brand new or already contains drawing entities.  If the file is brand new, attributes (such as line style) are loaded from the Tables section, so lines encountered in the Entities section will have the proper line style (solid, dash, dash-dot, etc.).  However, if an old drawing file is already open, AutoCAD will ignore the Tables section and only read the Entities section.  If the DXF file contains lines with styles not already defined, AutoCAD will issue an error message and abort the DXF import.  It is recommended you choose the All lines same style option when exporting DXF files that will be imported into existing AutoCAD drawings.  AutoCAD will then assign the default style to all lines in the imported layer (named GSLAYER).

Choose All lines same width if you want exported lines to be assigned the default width (for the GSLAYER) when imported into AutoCAD.  Otherwise, exported lines will be the same width assigned in the application document.

Text can be exported as DXF polygons and lines (All text as lines checked).  Since polygons cannot be filled, the interiors of the character images are transparent.  For best results when exporting text as lines, choose stroked typefaces (such as GS Helv) before exporting DXF files.

Text can also be exported as AutoCAD text entities (All text as lines unchecked).  No matter what typeface is specified in the application document, all text entities are assigned AutoCAD's STANDARD font.  Once inside AutoCAD, the text entities can be edited in the normal AutoCAD fashion.  As long as there is no shear or perspective, DXF text entities will be sized and oriented similar to the text objects in the application document.  Shear occurs when the character glyphs are not perpendicular to the text baseline.  Perspective occurs when the height of glyphs in the text string are not all the same, as in a 3-D view where the glyphs are smaller the farther they are from the observer.

File Description

General Messages

AutoCAD DXF-specific Messages

Macro Script Options


AutoCAD DXF File Description

Graphical information may be stored in the AutoCAD Drawing Exchange Format (DXF).  Many programs, including AutoDesk Inc.'s AutoCAD (Computer Aided Design) program can import DXF files, allowing one to display and/or further manipulate the images.

DXF files can be stored in either ASCII or Binary format.  ASCII DXF files are the most versatile, since they can be displayed, edited, printed and transported to non-IBM machines (such as mainframes, minicomputers or Macintosh).  However, they are somewhat bigger and take longer to read back into another application.

DXF files have two important sections.  The Tables section contains definitions of the various line styles and other attributes.  The Entities section contains specific information about each graphical entity (line, polygon, etc.) including coordinates and references to the attributes in the defined in the Tables section.  All exported graphical entities are assigned to a layer named GSLAYER.

The DXF file format doesn't allow graphical entities (such as rectangles, polygons, etc.) to be filled.  Therefore, only the edges of objects are exported.  Their interior is always transparent.

Text can be exported as DXF polygons and lines (All text as lines checked).  Since polygons cannot be filled, the interiors of the character images are transparent.  For best results when exporting text as lines, choose stroked typefaces (such as GS Helv) before exporting DXF files.

Text can also be exported as AutoCAD text entities (All text as lines unchecked).  No matter what typeface is specified in the application document, all text entities are assigned AutoCAD's STANDARD font.  Once inside AutoCAD, the text entities can be edited in the normal AutoCAD fashion.  As long as there is no shear or perspective, DXF text entities will be sized and oriented similar to the text objects in the application document.  Shear occurs when the character glyphs are not perpendicular to the text baseline.  Perspective occurs when the height of glyphs in the text string are not all the same, as in a 3-D view where the glyphs are smaller the farther they are from the observer.

Lines styles are exported with equivalent AutoCAD-compatible line types.  The document's internal line styles are assigned the following AutoCAD line type names:

Document	AutoCAD
Solid	GSSOLID
Internal Dash	GSDASHED
Internal Dot	GSDOTTED
Internal Dash-Dot	GSDASHDOT
Internal Dash-Dot-Dot	GSDASHDOTDOT

Custom line styles in the document are assigned AutoCAD line type names of the form GSCUSTOM0, GSCUSTOM1, GSCUSTOM2, etc.

DXF color numbers are assigned  to each entity.  By convention, only the first 8 (out of a possible 256) color numbers have known colors assigned to them by AutoCAD.  They are:

	0	Black	(The default for GSLAYER)
	1	Red
	2	Yellow
	3	Green
	4	Cyan
	5	Blue
	6	Magenta
	7	White

When exporting to DXF format, the color number of the color from these eight which is the closest to the actual line color of the object is assigned to the entity in the DXF file.  Unless you use line colors from this list, the color of lines inside AutoCAD will be different than those in the application document.


Macro Script Options

Since the Export Options dialog isn't displayed when the program is driven from a macro command script (via GS Scripter or Visual Basic), 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.  An typical example would be:

...(File="contour.dxf",Options="Defaults=1,FormatASCII=0")

This would first set all export options to their default values, then set the FormatASCII option value to zero, which would specify the DXF file (contour.dxf) be written in Binary format.

Option	Action	Default
Defaults=1	Set all options to their default values	No
ForgetOptions=1	Don't remember options for later use	No
FormatASCII=1 FormatASCII=0	DXF file will be written in ASCII format DXF file will be written in Binary format	Yes No
ScalingSourceApp=1 ScalingSourceApp=0	Use application-supplied scaling parameters Use saved scaling parameters	Yes No
SaveScalingInfo=1	Save scaling parameters for later use	No
AllColorsSame=1	All colors converted to default color	No
AllStylesSame=1	All line styles converted to default line style	Yes
AllWidthsSame=1	All line widths converted to default line width	No
AllTextToLines=1	All text converted to lines	Yes
APPLowerLeftX=N.N	Set application page rectangle lower left X value	N/A
APPLowerLeftY=N.N	Set application page rectangle lower left Y value	N/A
APPUpperLeftX=N.N	Set application page rectangle upper left X value	N/A
APPUpperLeftY=N.N	Set application page rectangle upper left Y value	N/A
DXFLowerLeftX=N.N	Set DXF scaling rectangle lower left X value	N/A
DXFLowerLeftY=N.N	Set DXF scaling rectangle lower left Y value	N/A
DXFUpperLeftX=N.N	Set DXF scaling rectangle upper left X value	N/A
DXFUpperLeftY=N.N	Set DXF scaling rectangle upper left Y value	N/A


AutoCAD DXF-specific Messages

The following messages may appear while exporting AutoCAD DXF files.

Scaling rectangle has no width and/or height

Unkown line style


 Scaling rectangle has no width and/or height

Both the Page rectangle and the DXF rectangle must have width and height.  Enter the coordinates of the lower-left and upper-right corners of each rectangle.  It's a good idea to specify corner points that are some distance apart.  This will avoid scaling inaccuracies.


 Unknown line style

An unknown line style was encountered while exporting a DXF file.  A solid line style will be automatically substituted.  While this is a non-fatal error, it may indicate an internal problem in the program.  If this problem persists, contact Technical Support.


General Messages

The following messages may appear while exporting files in any format.

Can't load Output Processor resource

Coordinate conversion error

Could not create the Output Device Context

Error opening the export file

Error reading Output Processor profile information

Error while writing to export file

Internal inconsistency in Output Processor

Invalid Output Device Context handle

Invalid Output Processor caller instance handle

No pushed ODC to pop

ODC has no associated Windows DC

Out of global memory

Out of local memory

Output Processor can't create a BeginPaint ODC

Output Processor can't create a Bitmap ODC

Output Processor can't create a Metafile ODC

Output Processor can't create a Printer ODC

Output Processor can't create a Window ODC

Output Processor doesn't support GSODevToLog

Output Processor doesn't support GSOGetOutputCaps

Output Processor doesn't support GSOLogToDev

Output Processor doesn't support GSOSet/GetViewport

Output Processor passed bad parameter

Unknown fill pattern type


Can't load Output Processor resource

Free memory may be exhausted, or memory contents are corrupted.  Close all active applications and restart Windows.  Please report this situation to Technical Support.


Coordinate conversion error

The program has detected an internal error.  Close all active applications and restart Windows.  Please report this situation to Technical Support.


Could not create the Output Device Context

Free memory may be exhausted, or memory contents are corrupted.  Close all active applications and restart Windows.  Please report this situation to Technical Support.


Error opening the export file

The file you specified cannot be created or modified.  Make sure there is ample free space on the output device and you have the proper file access permissions.


Error reading Output Processor profile information

Information stored in the application's .INI file could not be located.  If the .INI file is corrupted, you will need to restore a backup copy or, possibly, reinstall the stoftware.  You should probably check with Technical Support before proceeding.


Error while writing to export file

Make sure there is ample free space on the output device and you have the proper file access permissions.  It is also possible that free memory may be exhausted, or memory contents are corrupted.  Close all active applications and restart Windows.


Internal inconsistency in Output Processor

The program has detected an internal error.  Close all active applications and restart Windows.  Please report this situation to Technical Support.


Invalid Output Device Context handle

The program has detected an internal error.  Close all active applications and restart Windows.  Please report this situation to Technical Support.


Invalid Output Processor caller instance handle

The program has detected an internal error.  Close all active applications and restart Windows.  Please report this situation to Technical Support.


No pushed ODC to pop

The program has detected an internal error.  Close all active applications and restart Windows.  Please report this situation to Technical Support.


ODC has no associated Windows DC

The program has detected an internal error.  Close all active applications and restart Windows.  Please report this situation to Technical Support.


Out of global memory

Free memory may be exhausted, or memory contents are corrupted.  Close all active applications and restart Windows.  Please report this situation to Technical Support.


Out of local memory

Free memory may be exhausted, or memory contents are corrupted.  Close all active applications and restart Windows.  Please report this situation to Technical Support.


Output Processor can't create a BeginPaint ODC

The application has requested the Output Processor DLL perform an unsupported operation.  This is probably indicative of an internal error.  Close the application, then restart it.  If this problem persists, contact Technical Support.


Output Processor can't create a Bitmap ODC

The application has requested the Output Processor DLL perform an unsupported operation.  This is probably indicative of an internal error.  Close the application, then restart it.  If this problem persists, contact Technical Support.


Output Processor can't create a Metafile ODC

The application has requested the Output Processor DLL perform an unsupported operation.  This is probably indicative of an internal error.  Close the application, then restart it.  If this problem persists, contact Technical Support.


Output Processor can't create a Printer ODC

The application has requested the Output Processor DLL perform an unsupported operation.  This is probably indicative of an internal error.  Close the application, then restart it.  If this problem persists, contact Technical Support.


Output Processor can't create a Window ODC

The application has requested the Output Processor DLL perform an unsupported operation.  This is probably indicative of an internal error.  Close the application, then restart it.  If this problem persists, contact Technical Support.


Output Processor doesn't support GSODevToLog

The application has requested the Output Processor DLL perform an unsupported operation.  This is probably indicative of an internal error.  Close the application, then restart it.  If this problem persists, contact Technical Support.


Output Processor doesn't support GSOGetOutputCaps

The application has requested the Output Processor DLL perform an unsupported operation.  This is probably indicative of an internal error.  Close the application, then restart it.  If this problem persists, contact Technical Support.


Output Processor doesn't support GSOLogToDev

The application has requested the Output Processor DLL perform an unsupported operation.  This is probably indicative of an internal error.  Close the application, then restart it.  If this problem persists, contact Technical Support.


Output Processor doesn't support GSOSet/GetViewport

The application has requested the Output Processor DLL perform an unsupported operation.  This is probably indicative of an internal error.  Close the application, then restart it.  If this problem persists, contact Technical Support.


Output Processor passed bad parameter

The program has detected an internal error.  Close all active applications and restart Windows.  Please report this situation to Technical Support.


Unknown fill pattern type

The application has requested that the Output Processor DLL fill the interior of an object with a pattern the Output Processor doesn't support.  Choose a different fill pattern.