You are here: Menu Commands > File > Export > String file to DXF
GEOVIA Surpac

Export String file to DXF

This function converts a string file to a DXF file. It is possible to create DXF files which have only 2 dimensional data or 3 dimensional data by selecting the appropriate option.

To run this function: Choose File > Export > String file to DXF, or...

  • In the Function Chooser, type STRING TO DXF, and press ENTER.

The choice of 2D or 3D is provided, because the 3D .dxf file is much larger than the equivalent 2D file and wastes disk space if Z values are unnecessary.

The export to DXF can also take note of the styles file that defines how strings are presented in the 3D graphics module, using colour and point attributes, or it can be done as simply as possible with only DXF polylines for each string.

Define the string files to convert

Enter the Location and ID range of string files to be converted to DXF format.

Convert using styles file

The styles file for the string file can be used to determine how the conversion to the DXF file is performed. If the styles file is not used then all strings are exported as polylines to the DXF file.

If the styles file is used then the drawing method (ssi_method) in the styles file is used to control the export process. Only a subset of the drawing method specifications are used to control the export process. Features that influence the export process include:

line

If the drawing method includes the line attribute then the string is exported as a polyline. If the line attribute is not present then no polyline will be present in the DXF file. This is very useful if you only want to export text from selected description fields.

string file field name, e.g. X, Y, Z, D1, D2, ...

The values from various fields will be exported at each point on a segment if the drawing method contains the field name of interest. Note that text alignment characteristics are ignored when exporting attributes however the text path which defines the angle of rotation is used to orientate the text which is exported. The text size from the styles file is used to determine the size of the text in the DXF file.

marker

If the marker attribute is defined in the drawing method then individual points are written to the DXF file.

Location qualifiers

There are two important and useful qualifiers for the marker and string file field drawing method. These are:

#

By preceding the marker keyword or string file field name with the # qualifier, like #marker or #d1, you can ensure that the marker or attribute is only drawn at the first point of a segment.

!

By preceding the marker keyword or string file field name with the ! qualifier, like !marker or !d1, you can ensure that the marker or attribute is only drawn at the centre point of a segment. The centre point is derived by obtaining the average of the minimum and maximum X and Y values of the segment.

Note that all other drawing method instructions are ignored as the DXF file only provides limited support for many of the drawing method features.

Colour conversion

It is important to understand how colours in the styles file for various strings are converted to pen numbers in the DXF file. The same method used by the Autoplot module is used by this function. The colour to pen number mapping can be found in the plot edit pen file function and the plot palette edit function.

These two functions allow you to manage a palette of colours, by defining a colour name and its red, green and blue components and a pen number to colour cross reference. If there is no exact match for the colour to pen number the best match, within a reasonable tolerance is used. If a match within a reasonable tolerance is not found then a new pen will be created.

Strings as layer IDs

Determine if you want to use string numbers as layer ID's.

Layer ID

If you answered N to Strings as layer IDs then enter a layer name which will be used for each file in the specified range.

Selection

The DXF file created may be either a 2D(X and Y values only) file, a 3D (X, Y and Z values) file or a 3D file specifically for AUTOCAD V10 or later. Make a selection appropriate to your requirements.

Result

One .dxf file is produced corresponding to each string file. The .dxf files have the same file name as the string file but the extension is altered from .str to .dxf.

Note:No naming distinction is made between the files produced from a 2D or 3D conversion of a string file.

The resulting `.dxf file' may be loaded directly into any CAD package which reads DXF format.