Complex DWG Conversions - Export and Import a File

When you wish to export a Vertex file to AutoCAD as a DWG file, or import a DWG file into Vertex, a DWG setup file is used in the conversion of elements.

The conversions of the elements in a 2D drawing are defined in the setup file for exporting and importing the file. You can define the element conversions in the Vertex DWG export settings when exporting a Vertex drawing to AutoCAD, or in the DWG import settings when importing a DWG file into Vertex. In both cases, a setup file is created, which you can name and save for later use.

Export a File from Vertex
DWG Export Settings

Import a File to Vertex
DWG Import Settings

More Detailed Conversion

If necessary, you can define the element conversion in more detail than in the above method. For complex DWG conversions, you can add certain keywords to a setup file which you have previously created.

  1. Open the setup file in a text editor, for example NotePad.
  2. Add the keywords at the end of the setup file.
  3. You can add comments, describing the function of the keyword by entering an exclamation mark (!) at the beginning of the comment line.
  4. Finally, save the file.

The following is a list of keywords that you can use for complex DWG conversions. The list includes keywords that can be used in file conversions from Vertex to AutoCAD and vice versa. The use of these keywords requires a deeper knowledge of both software suites.

Default keyword value Other value
dwg_color_bylayer= 0 If set to 1, elements color will be BYLAYER in AutoCAD.
dwg_ltype_bylayer= 0 If set to 1, elements linetype will be BYLAYER in AutoCAD.
dwg_lweight_bylayer= 0 If set to 1, elements lineweight will be BYLAYER in AutoCAD.
dwg_all_layers= 1 If set to 0, only active levels will be transferred to AutoCAD.
dwg_hidden_layers= 0 If set to 1, hidden levels will be transferred to AutoCAD.
dwg_no_xdata= 0 If set to 1, no xdata is attached to entities when exporting to AutoCAD.

Xdata is used by Vertex when importing drawing back to Vertex.

dwg_dimensions= 1 If set to 0, dimensions are exported as blocks when exporting to AutoCAD.
skip_solids= 0 If set to 1, no AutoCAD solids are converted to Vertex.
scaled_texts= 1 If set to 0, texts converted to Vertex react to drawing scale.
dwg_update_text_macros= 0 If set to 0, updates text macros before converting when exporting to AutoCAD.
no_refpics= 0 If set 1, no reference picture elements are converted to AutoCAD.

If set 1, no external references are converted to Vertex.

no_rasters If set 1,no rasters are converted to AutoCAD.

If set 1,no rasters are converted to AutoCAD.

dwg_explode_macros= 0 If set to 1, all macros are exploded when exporting to AutoCAD.

If set to 2, all groups are exploded when exporting to AutoCAD.

If set to 256, all refpics are exploded when exporting to AutoCAD.

This parameter is cumulative. For example, you can set this parameter to 258 (2+256).

dwg_layer_byblock= 0 If set to 1, all elements of the macros are set on the layer 0 in the DWG file. If set to 0, the elements of the macros will keep their original layers.
dwg_extension= 1.0 Factor to scale all elements when importing to Vertex.
dwg_ltscale= 3.0 Overall linetype scale when importing to Vertex.
dwg_default_ltscale= 1.0 Scale factor for default linetypes when exporting to AutoCAD.

This keyword has any effect only when default linetypes are used.

In other words the setup file used contains no "ltype_dwg_vertex" keywords.

splines_as_polylines= 1 If set to 1, splines are converted to polylines when importing to Vertex.
dwg_use_spline_data= 1 If set to 0, polylines which have spline data will not be converted to splines when exporting to AutoCAD.
max_macros= 32000 Defines the max number of blocks which will converted to macros when importing to Vertex.

When the number is reached the remaining blocks are exploded before importing.

If value is set to zero, all AutoCAD inserts are exploded before import.

explode_minserts= 0 If set to 1, all MINSERTS are exploded before importing to Vertex.
dwg_hatches= 0 If set to 1, hatches are imported without exploding them when importing to Vertex.

If set to 2, hatches are skipped when importing to Vertex.

use_dimension_properties= 1 If value is set to 0, dimension string, color and text height are aqquired from dimblock instead of dimension properties when importing to Vertex.
use_recovery= 0 If set to 1, dwg file is read in recovery mode fixing errors in the dwg file when importing to Vertex.
dwg_use_wipeouts= 0 If value is set to 1, hiding hatches will be converted to Wipeouts when exporting to AutoCAD.

When Wipeouts are visible in AutoCAD they effectively remove hidden lines (Ctrl+H in Vertex).

NOTE: dwg_sort_draw_order must also be set to 1. Otherwise wipeouts will not work correctly.

dwg_sort_draw_order= 0 If set to 1, AutoCAD entity draw order is sorted so that texts and dimensions are always on top.

Also sorts wipeout draw order if dwg_use_wipeouts is set to 1.

dwg_wipeout_layer= 101 This keyword can be used to set the layer to which wipeouts go to when exporting to AutoCAD.

Number is an index to layer data in setup file or to Vertex levels if no setup data is given.

dwg_attribute_db= -1 Defines the attribute database number of macros which! will be converted to AutoCAD.
show_messages= 0 If set to one, error messages are shown to user.
default_dwg_ltype= 0 Default linetype when exporting to AutoCAD. Is index number to linetype definitions in setup-file.
default_color= 7 Default color of elements when exporting to AutoCAD.
dwg_upper_grey= 252

dwg_lower_grey= 20

These keywords define the threshold after when color is exported as white/black.

Grey value of the color is compared against these values. If the value is higher or lower than keyword values the color is exported as white/black.

default_dwg_ltype= 0 Default color of elements when exporting to AutoCAD. Is index number to layer definitions in setup or if definitions are missing, level number in Vertex.
default_vertex_layer= 0 Default layer of elements when importing to Vertex. Is index number to layer definitions in setup or if definitions are missing, level number in AutoCAD.
default_dwg_style= 0 Default text style when exporting to AutoCAD. Is index number to style definitions in setup.
default_vertex_layer= 0 Default text style when importing to Vertex. Is index number to style definitions in setup.
dwg_image_path= d:/images Folder to save images when exporting to AutoCAD.
dwg_keep_zoom= 0 If set to 1, current Vertex picture limits are applied to AutoCAD picture when exporting. Available in version 16.0.00 and newer.
dwg_write_version= 2000 AutoCAD version when exporting.

Legal values: 12,13,14,2000,2004,2007

This parameter overwrites version set in Save As dialog box in Vertex.

dwg_conv_param_out= ExampleWrite

dwg_conv_param_in=

A file in ../setup/DWG-folder which contains rules for picture parameter conversion.
dwg_conv_param_mode= 0 Used with keyword dwg_conv_param_in Mode 1: Rebuild picture with rules.
line_chains_to_polylines If set to 1, linechains are converted into polylines when exporting flattened drawing of a sheet-metal part to AutoCAD.
splines_and_ellipses_to_polylines= 0 If set to 1, splines and ellipses inside the line chain are converted into arcs and straight lines when exporting flattened drawing of a sheet-metal part to AutoCAD.
dwg_param_prog_out=

dwg_param_prog_in=

A parameric program in the folder ./sysprogs which is run with the conversion prosedure.

Program is run after picture parameter conversion (see above).

Supported dimensioning variables
DIMADEC
DIMASZ
DIMAZIN
DIMCLRD
DIMCLRE
DIMCLRT
DIMDEC
DIMEXE
DIMFRAC
DIMGAP
DIMLUNIT
DIMLWD
DIMLWE
DIMTAD
DIMTIH
DIMTOFL
DIMTOH
DIMTXT
DIMZIN
DIMEXO

VX-1547