You are on page 1of 34

DXF / DWG Integration Page 1 of 34

Navigation: Interfaces & Integration > DXF / DWG Integration


DXF / DWG Integration
Data exchange between CADMATIC Hull and other CAD systems is possible by using the DXF/DWG import and export options.

In this manual you will find all necessary information about the different possibilities of data exchange and to what level the data
can be imported or exported to and from the CADMATIC Hull application.

This manual is intended for the CADMATIC Hull system manager. Knowledge about AutoCAD is required in order to have
successful data exchange between CAD systems.

Differences in entities, pen colours, dash patterns, fonts, hatches, etc. between the two systems demand tuning of these import and
export options. This is done by several settings and configuration files which have to be set before these options can be used.

Five example configurations which can be used for general export tasks and an example for importing are described in this
document. These practical example configurations are ready to be used. (the examples can be generated with the option
"Import/Export" -> "DXF/DWG" -> "Configurations" in the System Management application).

This manual contains first of all general information regarding the import and export possibilities. Detailed information regarding
configuration settings can be found in a special chapter of this document. We advise you to read this general part first to understand
the different steps and possibilities.

The contents of this document is based on CADMATIC Hull version 5.3.

General

Export 2D DXF / DWG

Export to 3D DXF / DWG

Import DXF / DWG

ARX Plug-in

Configuration Files

Export to Layers

Import from Layers

2D Export

Possible Destinations

Possible Export Formats

Batch Export by means of External Selection

Export Settings

Influencing the Export Process

3D Export

Destination

Import

Import Settings

Variables

file:///C:/Users/cua54/AppData/Local/Temp/06BBHVKN.htm 4/18/2021
DXF / DWG Integration Page 2 of 34

Bluelines

Dxfversion

Expandsubmod

Removehatch

RemovePrHatch

Removefr7hatch

Special_act

SelectByColor

Spec_name

Tworuns

NoDXFDump

NupasLayerCtr

Dwg_message_level

Dwg_scan_mode

Dxf_color_by_layer

Dxf_expand

Dxf_filter

Dxf_layer_range

Export_filter

AExport_polyline

Scanlayer

Scanlinetype

Tablayer Tabdash Tabfont

Sample Configurations

general

Plotlines

nohatches

special

Color

import

Navigation: Interfaces & Integration > DXF / DWG Integration > General
General

file:///C:/Users/cua54/AppData/Local/Temp/06BBHVKN.htm 4/18/2021
DXF / DWG Integration Page 3 of 34

CADMATIC Hull has its own (drawing) file format with the extension "mod". To exchange these drawing files with other CAD
systems, CADMATIC Hull supports the DXF and DWG (AutoCAD tm) formats. These formats can be used for both 2D and 3D
transfer.

In practice it is not always possible to achieve a 100 percent exact data transfer. This because there are always differences between
the CAD systems. On the other hand it is not always useful that the data transfer is one to one exact, especially when the receiver
wants to use there own type of pens, layers and hatch patterns. Proper agreements between several suppliers can simplify the
differences between several CAD systems. In this way data transfer is handling not only the differences in pen types and dash
patters but also the definition of the construction types and levels. To exchange this kind of information it is always important to
know the requirements of the receiving party. Based upon these requirements a configuration should be made that defines the
conversion.

Because these entities are often differently defined in other CAD systems special attention has to be paid to following items:

l hatches
l text and TTF text
l lines which are partially continuous and partially dashed
l dimensions.

In most cases the exported files will be used only to inform the receiver. In that case the information has to be exact like a plot. In
other cases the receiver might want to use the information as a background layer or in some cases even to use detailed information.
The highest possible level is to use the information for further manipulation in the CAD system of the receiver. This is only possible
by using special requirements and good arrangements.

To control these differences as good as possible a number of import and export functions have been developed, each with their own
specific properties. To take the best use of these functions you should carefully study these functions. Before these functions, each
with their own specific possibilities, will be explained it is important to understand the general functionality:

l Entities are e.g. lines, texts and dimensions.


l Fragments are similar to the AutoCAD layers.
l Attributes are used to store specific information.

Apart from the difference in data structure there is no difference in how DXF or DWG is handled in the export or import process in
CADMATIC Hull. All data will be translated in the same way. The DXF file is written as an ASCII file while the DWG file has a
binary structure. In some cases the differences can be important for the receiver. However, in the CADMATIC Hull application we
treat these files with no differences and for that reason we speak about export and import possibilities and not about DXF or DWG
files.

Another possibility to transfer data between CADMATIC Hull and other CAD systems based on AutoCAD is the use of a ARX
plug-in in AutoCAD. With this plug-in it is possible to load CADMATIC Hull models directly into the AutoCAD program.
However this is only possible for 3D-models, so texts and dimensions will not be transferred.

Navigation: Interfaces & Integration > DXF / DWG Integration > General > Export 2D DXF / DWG
Export 2D DXF / DWG
Two different 2D export functions can be used in the applications 2D-Contek, 3D-Contek and Shell (with or without Plantek). Only
the level of information is different in these applications. In 3D-Contek every element has its own specific property, which can be
used for mapping into specific layers or colors. In the other applications some of these elements have to be controlled by the user.
The use of the CADMATIC Hull Layer definitions can be useful for this task. Otherwise pen numbers and or dash patterns can be
helpful. In some cases the standard fragment numbers can be used to a certain level. Explanation of the defaults can be found in the
files %ncghelps%\dxf\dxfselect.cmd and dxfselectplo.cmd.

The main difference between the two 2D export possibilities is the use of the plot functions "File" -> "Plot..." or "File" -> "Batch
Plotting" before the export process. The plot function can help you to get the same export results as the plot itself. Plot filters can
remove unnecessarily items like part numbers or other CAM data, (see for more information the "Import/Export" -> "Plotters" ->
"Configurations" in the System Management application). A practical example are the lines of decks and bulkheads in cross section.
These lines are usually presented as single lines (this because of the pen thickness which are defined on the plotter side), while the
receiver of the exported file likes to have the real thickness instead. The use of the standard plot function can help to solve these
kind of special requirements. The plot function creates a plot file with the extension "plo". This file can be used as input for the
export function.

Because of the open structure of the CADMATIC Hull system special requirements can always be made; contact CADMATIC to

file:///C:/Users/cua54/AppData/Local/Temp/06BBHVKN.htm 4/18/2021
DXF / DWG Integration Page 4 of 34

get more information.

In all cases it is important to choose the most suitable export function for the right purpose.

The two export procedures are both started with:

"File" -> "Export" -> "DXF/DWG"

The general differences between the two functions

The general difference between function one and two is the use of the plot file generated by the plot option.

l The disadvantage of using a plot file is the loss of the attribute information. This information is not present anymore after the
plot process.
l The benefit of the use of the plot file is the correct presentation of "line types representing parts behind other parts" in the
drawing. These "hidden parts" will be dashed during the plot process and this presentation will not be present when using the
"mod" files.

One other main difference, when using the plot file, is the treatment of the dimensions. These entities will be translated to lines and
annotations. This disadvantage is only relevant if the receiver wants to use or change these kind of information in his own CAD
system.

The disadvantage of the missing attribute information can be reduced by using special plot configurations, which can be used to
change the fragments and or colors of different construction items that are stored in the same fragments and pen numbers. These
fragments can be used to specify the layer structure in the export configuration. For example the plates and brackets have the same
fragments and pen numbers. By changing the fragments of one object type in the plot configuration it is possible with the export
configuration to export plates and brackets into separate layers.

In the next lines you will find an overview of the possibilities and differences of the two export procedures.

We have defined the 'Export DXF/DWG file' in two sections, section one describes only the possibilities when using the "mod" files
and section two the possibilities when using the "plo" files.

1. "File" -> "Export" -> "DXF/DWG" (exporting .mod files)

l All CADMATIC Hull elements can be mapped to layers.


l Certain lines, e.g. brackets which are behind a profile and which should be dashed, will be continuous.
l Because not all dimensions in CADMATIC Hull are completely native dimensions, only the complete native dimensions will
be converted to dimensions, the others will be a combination of dimensions, lines, and text.
l Text properties like underlined, boxed and italic are lost in the conversion.
l Hull lines are exported as polylines.

2. "File" -> "Export" -> "DXF/DWG" (exporting .plo files)

l Only CADMATIC Hull fragments and pen combinations can be mapped to layers.
l Certain lines, e.g. brackets which are behind a profile and which should be dashed will be converted correctly.
l CADMATIC Hull dimensions are converted to lines and texts.
l Hull lines are broken into separate vectors and are exported as lines.

Common features of both export functions

l Both single views and complete sheet drawings can be exported.


l Multiple single views and or sheet drawings can be exported at the same time.
l Also views/drawings from other sections can be exported.
l DXF and DWG files can be produced at the same time.
l Big jobs can be stored and executed later on by means of so called task files.
l Big jobs can be executed on a specified time by means of so called batch jobs.
l Special configuration settings can be used while exporting.

Points of attention for both export functions

l Hatches which have been made by "Draw" -> "Surface Colour" are converted into a number of 3D faces and a number of
solid hatches.
l Hatches which have been made by "Draw" -> "Hatches" and which consist of a number of single lines are converted into a

file:///C:/Users/cua54/AppData/Local/Temp/06BBHVKN.htm 4/18/2021
DXF / DWG Integration Page 5 of 34

block reference containing a number of lines.


l Hatches which have been made by "Draw" -> "Hatches" and which are "solid fill" hatches are converted into a number of 3D
faces and a number of solid hatches.
l Hatches which contain both "colour fill" and "solid fill" only the "colour fill" will be converted.
l Annotations which were created by referring to a text file larger then about 30 kbytes will not be presented completely by
AutoCAD.
l Texts that have been generated with the option "Draw" -> "Text/Dimensions" -> "TTF Text" result in a large number of 3D
faces and solid hatches. So the use of these kind of texts can result in larger DXF/DWG files.

Navigation: Interfaces & Integration > DXF / DWG Integration > General > Export 2D DXF / DWG > The Export Process
The Export Process
The export of a "mod" or "plo" file to a DXF or DWG file involves a number of steps in which configuration files play a crucial role
(see Configuration files for more information):

l The "mod" or "plo" files that have to be converted are chosen from a list.
l 'Label 1' of the configuration file dxf<configuration_name>.cfg is executed in order to set certain variables.
l The CADMATIC Hull elements are placed in layers according to <filename>.dat and Tab files are generated accordingly if
the Spec_name variable has been specified in 'Label 1'.
l 'Label 2' of the dxf<configuration_name>.cfg file is run through in order to perform pre-conversion actions.
l The final conversion takes place where by means of the Tab files, the drawing entities from the CADMATIC Hull fragments
are placed in the AutoCAD layers.
l 'Label 3' of the dxf<configuration name>.cfg file is run through in order to perform post-conversion actions.

Navigation: Interfaces & Integration > DXF / DWG Integration > General > Export to 3D DXF / DWG
Export to 3D DXF / DWG
In 3D-Show application there is one possibility to export a 3D-DXF/DWG file, this function, "File" -> "Export" -> "DXF/DWG",
creates both DXF and DWG files.

There is however no possibility to put specific parts in specific layers depending on a configuration.

The presented solids will be exported as 3D faces, see ARX plug-in for more information.

In Hull Shape application there is one possibility to export 3D-DXF/DWG files, this function, "File"->"Export"->"DXF-file",
automatically creates a DXF file of every shape line of the shape database.

If one file is required of the entire hull shape the 3D-Show export function has to be used.

Navigation: Interfaces & Integration > DXF / DWG Integration > General > Import DXF / DWG
Import DXF / DWG
The function File > Import > DXF/DWG can be used to import drawings saved in DXF or DWG format. Drawings imported with
this option can be handled only as 2D drawings, there is no link to the CADMATIC Hull construction database.

The possibilities of this import function are as follows:

l Multiple DXF/DWG files can be imported in one session.

file:///C:/Users/cua54/AppData/Local/Temp/06BBHVKN.htm 4/18/2021
DXF / DWG Integration Page 6 of 34

l Big jobs can be stored and executed later with batch jobs.
l Configurations can be used to put the contents of layers or entities with a specific color in specific fragments or change colors
of entities.
l CADMATIC Hull can import DXF/DWG files compatible with the DXF/DWG file format of AutoCAD versions up to 2002.

AutoCAD entities which will not be imported are:

l Acis objects
l Attribute definitions
l Construction lines
l Hatches generated by AutoCAD.
l Leaders
l Multi lines
l Rays
l Shapes
l Some kinds of splines, polylines containing spline fits
l Views, Viewports

When very large DXF/DWG files have to be imported it can be necessary to split the result of the import into smaller models,
because of the handling speed. This can be done with the 2D-Contek option Tools -> Divide Model into Views.

Navigation: Interfaces & Integration > DXF / DWG Integration > General > Import DXF / DWG > The Import Process
The Import Process
The import of a DXF or DWG file as a "mod" file involves a number of steps in which configuration files play a crucial role:

l The DXF/DWG files that have to be converted should be chosen.


l 'Label 4' of the configurations file dxf<configuration_name>.cfg is run through in which certain variables are set.
l 'Label 5' of the dxf<configuration_name>.cfg file is run through in order to execute actions before conversion.
l Using the Tab files, the elements from the AutoCAD layers are placed in CADMATIC Hull fragments during the import
action, a drawing model will be created in the subdirectory '<project>\<section>\2d\overige'.
l Conversions will be executed which are defined by the Spec_name variable.
l 'Label 6' of the dxf<configuration name>.cfg file is run through in order to execute post-conversion actions.

Navigation: Interfaces & Integration > DXF / DWG Integration > General > ARX Plug-in
ARX Plug-in
With the help of an 'ARX plug-in' it is possible to import a 3D Hull model from 3D-Show or from the Hull Viewer directly into
AutoCAD.

An 'ARX plug-in' is a program library that can be loaded into the AutoCAD program. Commands defined inside the ARX become
AutoCAD commands and can be typed in and executed from the command line.

'ARX plug-ins' for CADMATIC Hull are available for AutoCAD R14, 2000/2002, 2004, 2005 and 2006. They add the command
eaglein to the AutoCAD program. With this command, a 3D Hull model (.mod) which is generated by 3D-Show or by the Hull
Viewer can be loaded into AutoCAD. The 3D model is generated in CADMATIC Hull by saving a model in 3D-Show or using the
Save as command in the Hull Viewer. The plug-in for AutoCAD 2004 is compatible with AutoCAD 2005 and 2006.

When 3D information has to be imported into AutoCAD, using the 'ARX plug-in' has the advantage that the imported objects are 3D
solids which have a volume. In 3D DXF/DWG files exported from 3D-Show however each CADMATIC Hull element consists of a
number of 3D faces which are describing the same volume. So the use of the 'ARX plug-in' in AutoCAD delivers a more useable 3D
model.

file:///C:/Users/cua54/AppData/Local/Temp/06BBHVKN.htm 4/18/2021
DXF / DWG Integration Page 7 of 34

Loading the ARX plug-in

Make sure that the correct ARX plug-in:

autocadR14.arx,

autocad2000.arx,

autocad2002.arx or

autocad2004.arx (also for version 2005 and 2006)

for your AutoCAD version is available somewhere on your computer (e.g. the directory C:\Program Files\AutoCAD 2004).

There are 2 ways how to load the ARX into the AutoCAD:

1. Using the "Tools" -> "Load Application" menu option. The 'ARX plug-in' can be selected to be loaded once, or it can be
added to the list of applications to be loaded at start-up. In that way it will always be available in AutoCAD.
2. By typing in the commands appload or arx on the command line it is also possible to load the 'ARX plug-in'.

Using the ARX plug-in

Once the 'ARX plug-in' is loaded, the AutoCAD user can type the command eaglein on the command line. The selected model file
(*.mod ) is loaded.

It is possible to make the eaglein command accessible in AutoCAD by some menu or button. Please check your AutoCAD
manual how to do this.
Note that the 'ARX plug-in' will only process so called 'extrusions'. If you wish to read an Hull model created by 3D-Show, be
aware that some entities may be skipped (such as cylinders or irregular solids). So, it is recommended to use models saved by
the CADMATIC Hull Viewer, because they solely consist of extrusions.

Navigation: Interfaces & Integration > DXF / DWG Integration > General > Configuration Files
Configuration Files
Before starting the process of importing or exporting, a number of specifications have to be made or must be present. These
specifications can be made in the various configuration files which are used by the conversion process.

The files with the names dxf-<configuration_name>.cfg will be used in the conversion, and they are located in the %ncghelps%\dxf
directory.

A number of variables are specified in these configuration files to handle the import and export of DXF/DWG files. The files are so
called macros that always contain at least six labels. The variables under labels 1 to 3 are used in the export function for drawings,
while labels 4 to 6 are used in the import function of drawings.

Export

l Label 1 : Variables to which a value has been assigned.


l Label 2 : Pre-conversion actions for each drawing.
l Label 3 : Post-conversion actions for each drawing.

Import

l Label 4 : Variables to which a value has been assigned.


l Label 5 : Pre-conversion actions for each drawing.
l Label 6 : Post-conversion actions for each drawing.

The variables that can be specified under labels 1 and 4 will be explained in paragraphs 2D Export and Import, respectively.

Labels 1 and 4 must also contain the name and path of the so called tab files, which contain the layer, line type, font, and hatch
presentation mappings for the import and export process. See Tab Files for more information.

An example file for general export/import purposes is presented below.

file:///C:/Users/cua54/AppData/Local/Temp/06BBHVKN.htm 4/18/2021
DXF / DWG Integration Page 8 of 34

Show/hide example.

Managing Several Configuration Files

Before using the import or export functions a choice can be made from a list of available configurations. The Import/Export >
DXF/DWG > Configurations function in System Management application can be used to specify the configurations to be used in
the configuration list. Also the order in which the configurations are to be presented in the selection list, and thus the default
configuration (the first one in the list) can be defined.

In the Configurations dialog, the list with available configurations contains the configuration names of the files dxf-<configuration
name>.cfg in the %ncghelps%\dxf directory.

You should use configuration file names that are easily recognized for their purpose, such as:

l dxf-client_general.cfg
l dxf-client_plotlines.cfg
l dxf-client_electric.cfg
l dxf-client_engine.cfg

If a new configuration file is created in the %ncghelps%\dxf directory, you can use the Import/Export > DXF/DWG >
Configurations function to add the configuration to the configuration list.

The configuration list can be set for a particular project with the Local File (project) option, or as a global configuration list with
the Global file (%ncghelps%) option.

If the configuration list is reset for a particular project, it is removed from the %ncgnorms% directory, and the global list is used in
the File > Export > DXF/DWG function.

Navigation: Interfaces & Integration > DXF / DWG Integration > General > Configuration Files > Tab Files
Tab Files
In the conversion a number of Tab files are used to determine how the various properties of the drawing elements are converted.
These files establish relationships between the CADMATIC Hull fragments, dash patterns, fonts, and hatches and the AutoCAD
layers, line types, fonts, and hatch patterns, respectively. Depending on the configuration, the Tab files can be adjusted to suit the
customer needs.

The Tablayer, Tabdash, Tabfont, and Tabhatch files define the conversion of fragments to layers, dash patterns to line types, fonts to
text style, and CADMATIC hatch patterns to AutoCAD hatch patterns, respectively.

Tab files are stored in the %ncghelps%\dxf directory. For each configuration there is a set of tab files defined, each suited to the
needs of a certain conversion.

The exact location of the tab files must be specified with the environment variables %tabdash%, %tabfont%, %tablayer% and %
tabhatch%, in the labels 1 or 4 of the configuration file. It is important to use the full path. The variable %NCGHELPS% can be
used as a prefix. For example:

file:///C:/Users/cua54/AppData/Local/Temp/06BBHVKN.htm 4/18/2021
DXF / DWG Integration Page 9 of 34

{
STRING ncghelps_path
ncghelps_path=env(NCGHELPS)
environment tabfont='^ncghelps_path/dxf/tabfontexpgeneral.dat'
environment tabdash='^ncghelps_path/dxf/tabdashexpgeneral.dat'
environment tablayer='^ncghelps_path/dxf/tablayerexpgeneral.dat'
environment tabhatch='^ncghelps_path/dxf/tabhatchexpgeneral.dat'
}

Navigation: Interfaces & Integration > DXF / DWG Integration > General > Configuration Files > Tab Files > Tablayer
Tablayer
In the export process there are three methods to convert Hull fragments to AutoCAD layers. In all these methods the tablayer file
plays an essential role. In combination with the environment setting %DXF_COLOR_BY_LAYER% two different conversions can
be realized:

1. fragments are put to AutoCAD layers: DXF_COLOR_BY_LAYER=NO


2. fragments are put to AutoCAD layers together with a specified pen number for each layer:
DXF_COLOR_BY_LAYER=YES.

In the first case the pen number of each element from Hull is put to the same colour number in AutoCAD while in the second case
the colour of each fragment or layer can be specified. In this last case it is still possible to preserve individual Hull pen numbers for
the elements in a specific fragment or layer.

3. Another method of Hull fragment to AutoCAD layer mapping is a more Hull specific conversion. With this method for each
construction type it can be specified in which layer and with which pen number Hull elements are exported. For more
information see Export to layers.

The setting DXF_COLOR_BY_LAYER is only considered in the export process. So, in the import process only AutoCAD layers
can be converted to different fragment numbers, which is the first method.

If DXF_COLOR_BY_LAYER=NO or if DXF_COLOR_BY_LAYER is not defined, each line in the tablayer file has the following
format:

Hull_fragment AutoCAD_layer

For example:

20 Shape
21 Part_in_section
79 Part_in_view

The Hull fragment is expressed in a numerical value and the AutoCAD layer is a string value.

With this format each drawing element in the DXF/DWG files will receive the same colour number as the element in the Hull
drawings. This means that if an element in Hull has for example colour (pen number) 4, the converted element in the DXF/DWG
file also has colour number 4.

If the environment DXF_COLOR_BY_LAYER=YES is used in 'Label 1' of the configuration file, all elements in a certain Hull
fragment will receive after conversion the colour "bylayer". In this case the used tablayer file has to contain a third column that
specifies the colour of the AutoCAD layer. The tablayer file has then the following format:

Hull_fragment AutoCAD_layer Colour_of_ the_ layer

For example:

20Shape 3
21Part_in_section4
40Profile -999
79Part_in_view 5

With colour number -999 all entities in that specific fragment receive the same colour number in the DXF/DWG as they have in the
Hull model.

file:///C:/Users/cua54/AppData/Local/Temp/06BBHVKN.htm 4/18/2021
DXF / DWG Integration Page 10 of 34

With this example fragment 20 is converted to the AutoCAD layer Shape with colour number 3. All elements in fragment 20 get the
colour BYLAYER and are therefore presented in the DXF/DWG with colour 3. All elements in fragment 40 are put in layer Profile
with their respective colour numbers.

The third column of the tablayer file has to contain a numerical value (not a colour designation!).

This format of the tablayer file can only be used in the export process not in the import process.

With the third method the tablayer file is written by the export process depending on the specified conversion file. See Export to
layer for more information.

Navigation: Interfaces & Integration > DXF / DWG Integration > General > Configuration Files > Tab Files > Tabdash
Tabdash
The tabdash file is used to specify the correspondence between the CADMATIC Hull dash patterns and the AutoCAD line types.

Each line in this file has the following format:

Hull_dash_pattern AutoCAD_line_type

For example:

0 CONTINUOUS
1 HIDDEN
2 CENTER
3 DASHDOT
4 DASHED
5 PHANTOM

In the export process Hull dash pattern definitions are converted to line type definitions in the DXF/DWG file with the names
specified in the tabdash file. The DXF/DWG file contains not only the name of the line type but also the definition of the pattern.

So, it is possible to export a Hull dash pattern named "continuous" to the DASHED line type in AutoCAD. In that case all lines of
type DASHED will be continuous.

In the import process AutoCAD line types are mapped to Hull dash patterns. However, in this case the line type definition in the
DXF/DWG doesn't overrule the dash pattern definition in Hull. So, if for example the continuous line type is mapped to a dashed
Hull pattern the line pattern will remain dashed.

Navigation: Interfaces & Integration > DXF / DWG Integration > General > Configuration Files > Tab Files > Tabfont
Tabfont
The tabfont file is used to specify the correspondence between the CADMATIC Hull fonts and the AutoCAD text styles.

Each line has the following format:

Hull_font_number AutoCAD_text_style

For example:

1 STANDARD

2 ROMANC

Navigation: Interfaces & Integration > DXF / DWG Integration > General > Configuration Files > Tab Files > Tabhatch
Tabhatch
The tabhatch file is used to specify how CADMATIC Hull hatch patterns are converted to AutoCAD hatch patterns.

file:///C:/Users/cua54/AppData/Local/Temp/06BBHVKN.htm 4/18/2021
DXF / DWG Integration Page 11 of 34

Each line in this file has the following format:

name a b c d e f - where:

l name is the hatch pattern name (LINE for hatches with a striped pattern, SOLID for completely filled hatches)
l a is the Hull colour number for the completely filled hatch (the value for hatches with a striped pattern is -1)
l b is the Hull hatch number (hatch index)
l c is the scale of the hatch pattern (for pre-defined hatch)
l d is the spacing of the hatch pattern (for user-defined hatch)
l e is the angle of the pattern in degrees
l f indicates if the export should use BLOCK_DEFINITION (0 indicates no, 1 indicates yes).
For information on AutoCAD Block Definition, please refer to AutoCAD documentation.

For example:

LINE -1 1 0.9448 0 45 0

A specific tabhatch file, tabhatchblockr.dat, defines the hatch presentation for the PDF files that are generated along with
DXF/DWG export.

See 2D-Contek & 3D-Contek > Hull > Export > DXF/DWG for more information on generating PDF files while exporting to
DXF/DWG.

Navigation: Interfaces & Integration > DXF / DWG Integration > General > Export to Layers
Export to Layers
To place special Hull elements like: plates, brackets, part numbers, dimensions etc. in layers during exporting the file
<filename>.dat can be used in combination with the variable setting spec_name=<filename>.dat.

If the variable spec_name has not been set, fragments are converted to AutoCAD layers according to the tablayer file.

The file <filename>.dat should be created in the %ncghelps%\dxf directory, and has the following structure:

Element_indication AutoCAD_layername Color AutoCADLineType HullLineType

For example:

BRACKET Brackets 1CONTINUOUS0


POSNR Posnumbers2Dashed1
DIMENSIONSDimensions 3CONTINUOUS0

For Color and HullLineType also the letter 'A' can be used in which case selected items preserve respectively there color and/or their
dash pattern

For example:

BRACKET Brackets ACONTINUOUSA


POSNR PosnumbersADashed1
DIMENSIONSDimensions 3 CONTINUOUSA

The possible values for Element_indication are defined in the files %ncghelps%\dxf\dxfselect.cmd and dxfselectplo.cmd.

The values for Element_indication, AutoCAD_Layername and AutoCADLineType should not contain any spaces.

If elements with specific colours have to be put in specific layers, the setting selectbycolor=TRUE can be used in combination with
the spec_name setting. In this case all submodels will be expanded in order to be able to select all elements based on their pen
colour.

For example:

file:///C:/Users/cua54/AppData/Local/Temp/06BBHVKN.htm 4/18/2021
DXF / DWG Integration Page 12 of 34

COLOR1 pen_035 1 CONTINUOUS A

COLOR2 pen_050 2 CONTINUOUS A

COLOR3 pen_070 3 CONTINUOUS A

COLOR4 pen_025 7 CONTINUOUS A

By using the spec_name variable the in the dxf-<configuration_name>.cfg file specified tablayer and tabdash files will be
overwritten. So don't use the same tablayer and tabdash for export (label 1) and import (label 4) unless you want to import the
same file you exported. The files names should also be different from the ones used in other configurations.

The first three columns are used to rewrite the tablayer file specified with the %tablayer% setting while the fourth and fifth column
are used to adapt the tabdash file (%tabdash%).

Navigation: Interfaces & Integration > DXF / DWG Integration > General > Export to Layers > Element Indication
Element Indication
'Element_indication' contains the name of a label in the files dxfselect.cmd and dxfselectplo.cmd or a so-called "Layer control"
name.

The files dxfselect.cmd and dxfselectplo.cmd are located in the %ncghelps%\dxf directory and with each label in these files, specific
elements in a CADMATIC Hull drawing will be selected. In some cases, the selection criteria overlap one another, and thus the
order of sequence in which the <filename>.dat file is structured is important. Once an element has been selected it is not possible to
include it in a different selection. For example, if all plates have been selected first by the label PLATES, it is not possible anymore
to subsequently select hidden plates with the help of the label HIDDENPLATES or plates in plan view with the label
PLANPLATES.

The user is permitted to add extra labels or to change the selection criteria in the dxfselect.cmd and dxfselectplo.cmd files.

The dxfselectplo.cmd file is used when a ".plo" (plot file) is exported. The consequence of choosing a ".plo" file is that there is no
attribute information available for the drawing elements. Therefore, this attribute information cannot be used for selection purposes.

For instance: there is no difference between plates, brackets, and shell frames in a ".plo" file. If, under a label in dxfselect.cmd,
elements are selected that cannot be selected due to missing attribute information in the ".plo" file, the following line should be
included in the file dxfselectplo.cmd under the same label:

Selectable=0

Both files (dxfselect.cmd and dxfselectplo.cmd) must contain the same labels.

In case there are more than 131 different Element_indications (labels) needed for a specific spec_name setting the following lines
can be added at the top of the %ncghelps%\dxf\dxfselect.cmd file:

do lb1\dxfspecname('^spec_name')

NupasLaverVer=<version>

exit

and at the top of the file dxfselectplo.cmd:

do lb1\dxfspecname('plo^spec_name')

NupasLaverVer=<version>

exit

The files %ncghelps%\dxf\<spec_name>.cmd and %ncghelps%\dxf\plo<spec_name>.cmd must only contain selection labels in the
same way as in the dxfselect.cmd and dxfselectplo.cmd files.

file:///C:/Users/cua54/AppData/Local/Temp/06BBHVKN.htm 4/18/2021
DXF / DWG Integration Page 13 of 34

First the dxfselect or the dxfselectplo macro is used to search for a Element_indication. If it does not exists then the macro
<spec_name>.cmd or plo<spec_name>.cmd is executed. So, this macro should not contain the same label names of
Element_indications as in dxfselect.cmd and dxfselectplo.cmd.

If another name than the spec_name value is necessary, then this name can be inserted in the do line instead of spec_name. E.g. :

do lb1\dxfspecname('special_name')

and then the file %ncghelps%\dxf\special_name.cmd must exist and it is executed when the Element_indication label does not exists
in %ncghelps%\dxf\dxfselect.cmd file.

2D items can be organised with "Layer control". These "Layer control" names can be used to specify the AutoCAD layers. This is
done by using these "Layer control" names as an 'Element_indication'. In this case a special label definition in the dxfselect.cmd and
dxfselectplo.cmd files is not necessary.

In this case the setting NupasLayerCtr must be set to True in order to get correct "Layer control" identifications for all elements in a
2D or Plantek sub-model when the model is expanded.

Navigation: Interfaces & Integration > DXF / DWG Integration > General > Export to Layers > AutoCAD Layername
AutoCAD Layername
'AutoCAD_layername' contains the name of the AutoCAD layer in which the appropriate elements should be placed. Several kinds
of elements can be placed in the same AutoCAD layer.

Navigation: Interfaces & Integration > DXF / DWG Integration > General > Export to Layers > Color
Color
'Color' contains the colour that the element in the AutoCAD layer is to receive. The normal behaviour of the export function is that
the elements themselves will have a colour, while the layer itself will have a white colour. This behaviour can be overruled by the
environment variable %dxf_color_by_layer%, (see Tab Files). 'Color' has to be a numeric value or the character A. Colour
references such as RED, GREEN, etc. are not allowed.

If the character A is used, elements in question preserve their colour number as used in CADMATIC Hull.

The colour numbers assignment is not necessarily always the same in CADMATIC Hull and in AutoCAD or other CAD
programs. This means that although an element has the same colour number in CADMATIC Hull and in AutoCAD if the character
A is used, they can have different colours in both programs.

For example centre lines are drawn with colour number 4 which is in the CADMATIC Hull standard white. The exported line in
AutoCAD also has colour number 4 (when the character A is used) but in AutoCAD the default colour 4 is cyan.

Navigation: Interfaces & Integration > DXF / DWG Integration > General > Export to Layers > AutoCAD Linetype
AutoCAD Linetype
The export function also exports the line type (dash pattern) definition into the DXF/DWG file. For that reason the line types in
AutoCAD are conform to the dash patterns in Hull.

In AutoCAD the line types are indicated with names instead of numbers. With 'AutoCADLineType' these names are specified.

Already in AutoCAD defined line types with corresponding names are overruled with the dash pattern definitions of Hull. So, it can
be important to match these dash patterns to each other.

Navigation: Interfaces & Integration > DXF / DWG Integration > General > Export to Layers > HullLineType
HullLineType
In some cases it would be desirable to change the line type of a certain selection of Hull elements. This is possible with
'HullLineType'. If this is used care must be taken that the assigned number does not cause a conflict with the settings in the tabdash
file. Also, the settings in the <filename>.dat file and the used tabdash file must correspond to each other. This means that all values

file:///C:/Users/cua54/AppData/Local/Temp/06BBHVKN.htm 4/18/2021
DXF / DWG Integration Page 14 of 34

for 'AutoCADLineType' and 'HullLineType' used in the <filename>.dat file must also be initially in the tabdash file.

Also in one <filename>.dat file all combinations of 'AutoCADLineType' and 'HullLineType' must be unique. So, it is not allowed to
have an 'AutoCADLineType' related to more than one 'HullLineTypes' and vice versa.

If the character A is used for 'HullLineType' the in Hull defined line types for the selected parts will be taken as specified in the
tabdash file. The tabdash file will eventually be adapted if the <filename>.dat file contains other definitions for 'AutoCADLineType'
and 'HullLineType'.

It is essential that the tabdash file initially contains definitions for all used Hull line types.
Navigation: Interfaces & Integration > DXF / DWG Integration > General > Import from Layers
Import from Layers
To place the drawing entities of an AutoCAD layer as CADMATIC Hull elements in a certain fragment the tablayer file has an
important role. Furthermore, the conversion file <filename>.dat can be used in combination with the setting
spec_name=<filename>.dat. With this file certain fragment changes and colour changes can be specified. This file should be created
in the %ncghelps%\dxf directory.

The spec_name variable is the same as used in exporting, but now it has to be specified in label 4 of the configuration file.

In this conversion process the DXF/DWG file, which has to be imported first, will be converted to a Hull model after which the
result is adapted according to the file <filename>.dat and the dxfconvert.cmd macro.

The file <filename>.dat consists of a number of sections, each of which handles a certain type of conversion.

Each section starts with a label designation which must have been defined in the dxfconvert.cmd file. For example, COLOR
(general colour conversion), ARCCOLOR (conversion of arc colours), DIMCOLOR (conversion of dimension colours),
COLORFILL (conversion of colorfill colours) ,TEXTCOLOR (conversion of Text colours) or PLACELAYER (conversion of
fragments). Each of the lines under the label designation consists of two values. The first one is the original value, the second the
result of the conversion.

The start of a new section is indicated by a new label designation.

An example of such a conversion file is:

# change the colour 7 of dimensions to colour 4

DIMCOLOR

74

# change colour 1 to colour 4, colour 5 to 4 and colour 7 to 1.

COLOR

14

54

71

# move the contents of fragments 0\128 in the fragment 30.

PLACELAYER

0\128 30

For the possible labels see the file dxfconvert.cmd in the %ncghelps%\dxf directory.

file:///C:/Users/cua54/AppData/Local/Temp/06BBHVKN.htm 4/18/2021
DXF / DWG Integration Page 15 of 34

Navigation: Interfaces & Integration > DXF / DWG Integration > 2D Export
2D Export
By means of the option "File" ->"Export" ->"DXF/DWG" in 2D-Contek, 3D-Contek and Shell applications it is possible to export
2D drawings to the DXF/DWG format.

Navigation: Interfaces & Integration > DXF / DWG Integration > 2D Export > Possible Destinations
Possible Destinations
To prevent that the export function overwrites drawings with the same name, all files will be saved in a special location with the
same project structure as in CADMATIC Hull.

The default location can be set with the System Management application function "Import/Export" -> "DXF/DWG" -> "Export"
using 'Default Path For Export' button.

You can always change this path in the input field directly under 'DXF/DWG filename:' on the export or input panel.

This export structure has the benefit that exported drawings can be send easily to others.

The path in the input field must exist!

Navigation: Interfaces & Integration > DXF / DWG Integration > 2D Export > Possible Export Formats

file:///C:/Users/cua54/AppData/Local/Temp/06BBHVKN.htm 4/18/2021
DXF / DWG Integration Page 16 of 34

Possible Export Formats


By default the DXF/DWG format toggle in the export panel is set to 'DXF'. So, if the toggle is not changed manually all the selected
drawings will be exported in DXF format. This default behaviour can be overruled by the setting "Import/Export" -> "DXF/DWG" -
> "Export" in the System Management application by using the button 'Default Export File Type'. If this setting has the value 'Dwg'
the DXF/DWG format toggle is set to 'DWG' when the export panel is opened. In this case the DWG files are generated when the
toggle is not changed manually.

Drawings which are on the screen at the time the export function is started will be exported in the format which is active when the
export panel is opened.

Navigation: Interfaces & Integration > DXF / DWG Integration > 2D Export > Batch Export by means of External Selection
Batch Export by means of External Selection
Normally the sheet drawings to be exported are selected in the "File" -> "Export" -> "DXF/DWG" option by means of the selection
list. However, it is possible to use a file containing the selection which is created by another program. In this way, it is possible to
generate a selection of drawings with the help of for example a drawing management system.

In order to be able to use such a file in the "File" -> "Export" -> "DXF/DWG" option it has to meet the following conditions:

l The syntax of the filename is: dxfext*.ext in which * can be for example task1, task2, etc.
l The dxfext*.ext file has to be present in the directory: <projectname>\batch\dxfexpimp
l There are two possible formats:

1. Format one:

l <Name of the DXF configuration file which has to be used.>


l <Fixed part of the destination path>
l <Section name 1>,<Sheet drawingname 1>, <dxf|dwg>
l <Section name 2>,<Sheet drawingname 2>, <dxf|dwg>
l ... ...
l <Section name n>,<Sheet drawingname n>, <dxf|dwg>

In which n is the number of sheet drawings to be exported.

For example:

l dxf-ncgblue.cfg
l c:\projects\dxfout
l 102, 102-sheet-1, dxf
l 102, 102-sheet-2, dxf
l 305, 305-sheet-10, dwg
l 500, 500-sheet-3, dxf
l 500, 500-sheet-4, dxf

2. Format two:

file:///C:/Users/cua54/AppData/Local/Temp/06BBHVKN.htm 4/18/2021
DXF / DWG Integration Page 17 of 34

l <Name of the DXF configuration file which has to be used>


l <Fixed part of the destination path>
l <dxf | dwg | sectionname>
l <sectionname | dxf | dwg>
l <sheet drawingname 1>
l ...
l <sheet drawingname n>
l <dxf | dwg | sectionname | sheet drawingname>
l ... ....
l <dxf | dwg | sectionname | sheet drawingname>

In this format the lines containing the keywords dxf or dwg are only used to switch the format. This means if only dxf or dwg files
have to be generated one line containing dxf or dwg is sufficient.

For example:

dxf-ncgblue.cfg dxf-ncgblue.cfg
c:\projects\dxfout c:\projects\dxfout
dxf 102
102 dxf
102-sheet-1 102-sheet-1
102-sheet-2 102-sheet-2
dwg ordwg
305 305
305-sheet-10 305-sheet-10
dxf 500
500 dxf
500-sheet-3 500-sheet-3
500-sheet-4 500-sheet-4

If such a file exist it will be presented in the task files list where it can be selected and used like a normal task file.

Both last examples have the same result as the example with format one.

Navigation: Interfaces & Integration > DXF / DWG Integration > 2D Export > Export Settings
Export Settings
During the export process, the user can specify a number of settings. These variable settings that can be specified and are valid for
all drawings are specified under 'Label 1' of the dxf<configuration_name>.cfg file:

BlueLines = yes (default) | yes_m | no

Indicates whether or not the drawing is exported with the normal lines indicating the real thickness or with only one line.

If no or yes_m only one line is exported indicating the position of plates and brackets in section.

file:///C:/Users/cua54/AppData/Local/Temp/06BBHVKN.htm 4/18/2021
DXF / DWG Integration Page 18 of 34

no The moulded line of plates/brackets in section will be exported.


yes The normal lines indicating the real thickness will be exported.
yes_m Only the measure line of the normal lines will be exported.

This setting has no influence when "plo" files are exported. So, the result depends on the corresponding plot setting in the
plot configuration with which the "plo" file has been generated.

DXFVersion = 12 | 14 | 2000 (default)

Indicates which AutoCAD compatible DXF format is chosen.

If DXFVersion is omitted or has the value 2000 the export process creates a DWG/DXF file that is compatible with the AutoCAD
2000 format. If DXFVersion has the value 12 or 14 respectively a AutoCAD 12 or 14 compatible DXF file is generated.

NoDXFDump = true (default) | false

Indicates whether a "dump" and "etch" is performed in the export process.

This means if set to FALSE, dimensions are converted to lines and Texts or Mtexts (multi line texts) in the DXF/DWG file. If a
"dump" is performed the result in the DXF/DWG is visual more conform the dimensions in CADMATIC Hull, but they are not of
the entity dimension anymore. If no "dump" is performed, an object which in CADMATIC Hull is a dimension is also of entity
dimension in the DXF/DWG file.

true No dump is performed.

false A dump and etch is performed.

Because of the fact that there is a difference between dimension properties in AutoCAD and CADMATIC Hull, the drawing
will not be exact if this setting is set to true.

NupasLayerCtr = true | false (default)

This setting is used when CADMATIC Hull elements have to be put in the layers used by the "layer control" in CADMATIC Hull.

If this setting is set to true each element in a 2D sub-model or a plantek sub-model, which is in a particular layer, will get the same
layer identification when the model is expanded.

This setting is only effective if the spec_name conversion is used. In that case it is possible that certain 3D elements cannot be
selected as is done in the dxfselect.cmd macro with the help of labels in the %ncghelps%\dxf\dxfselect.cmd or dxfselectplo.cmd
macro.

true All elements in the plantek sub-models or sub-models from 2D receive the "layer control" identification of the sub-model.
false All elements in the sub-models keep identifications, if present, as they are.

This setting should be used only if the conversion according to the "layer control" layers is used, because it takes more time
to export the sheet drawings when this setting is set to true.

SelectByColor = true | false (default)

It refers to placing elements with a certain colour in a CADMATIC Hull drawing in a certain AutoCAD layer.

This variable is used in connection with the spec_name variable, to indicate that all sub-models are expanded before elements in the
drawing are selected, based on their pen colours. This is necessary for a complete conversion, based on only the pen colours of the
elements. The conversion is activated by specifying, in 'Label 1' of dxf-<configuration_name>.cfg file this settings and also the
name of the file that contains the details of the conversion. This file, specified with spec_name, contains the mapping of the
specified coloured elements to the specified layer.

file:///C:/Users/cua54/AppData/Local/Temp/06BBHVKN.htm 4/18/2021
DXF / DWG Integration Page 19 of 34

true All submodels are expanded


false The drawing still contains sub-models from the %ncgmodellen% directory.

Spec_name = <filename>

It refers to placing specific elements like brackets, brackets in section, brackets in view, plates, plates in section, etc. from a
CADMATIC Hull drawing into a specific AutoCAD layer.

For example, it is possible to place all brackets in one layer and all plates in another. Or, it is possible to place all constructions in
view in a specific layer and constructions in section in another. All items that can be selected with standard Eagle commands can be
put in specific layers. Explanation of how items can be selected can be found in %ncghelps%\dxf\dxfselect.cmd or
dxfselectplo.cmd.

The conversion is activated by specifying the name of the file that contains the details of the conversion, in the configuration file
dxf-<configuration_name>.cfg. This is done by including the line Spec_name=<filename> under 'Label 1' of the .cfg file. The name
of the file, <filename>, can be specified by the user. When <filename> contains no extension, it is assumed to be ".dat". See also:
Export to layers.

Special_Act = yes | no (default) | yes_m

If this setting is set to yes, the configuration file dxf-<configurationname>.cfg should contain the label SPECIALEXP. This label is
then executed just after the drawing is loaded.

If the setting bluelines is set to yes or yes_m the sub-models other than the ones in the %ncgmodellen% directory will be expanded
and the bluelines will also be present before this label is executed. Furthermore, no special actions like expanding all sub-models,
hatch removal, etc. have been performed yet. So, by using this label it is, for example, possible to manipulate the sub-models of a
sheet drawing (bluelines set to no). After this the normal process will be continued.

If 'Label 1' of the configuration file contains the line special_act='yes' the configuration file should also contain the label
SPECIALEXP.

Removehatch = all | yes | no (default)

It indicates whether or not the hatches or colour fills should be removed.

Complex hatches or colour fills can result into large DXF/DWG files, because in the export process a complex object is divided into
triangles. This means they are divided into triangles and then exported. For example, a HP-profile in section is not exported as one
object but as a number of 3D faces and a number of hatches. To be able to reduce the size of the DXF/DWG the hatches and colour
fills can be removed leaving the contour of the object in the form of 3D-faces.

If this setting is set to All it causes the removal of all hatches and colour fills in the export process. Settings this to yes causes the
removal of fragment 14 and 31 hatches and colour fills and also the faces of profiles in section.

Removefr7hatch = yes | no (default)

This setting controls the removal of hatches and colour fills of logos or TTF-characters in the title field.

Complex logos and TTF-characters generate large DXF/DWG files, because of the triangularisation of these objects. Set this
settings to yes in 'Label 1' of the configuration file (dxf-*.cfg) for the removal of the hatches and colour fills in the title field (in Hull
fragment 7). If the logo is designed in a way that there are contour lines, these lines are converted too.

RemovePrHatch = yes | no (default)

It indicates whether or not the hatches and colour fills from profiles in section and plates in section (which are presented as thick red
lines) should be removed. These kind of hatches can result in large DXF/DWG files.

Personal macros (Label 2 and Label 3)

In addition to the export settings, you can create a number of personal macros and include these under 'Labels 2' and 'Label 3' of the
dxf-<configuration_name>.cfg file.

Label 2 - Pre-conversion actions

file:///C:/Users/cua54/AppData/Local/Temp/06BBHVKN.htm 4/18/2021
DXF / DWG Integration Page 20 of 34

Include here extra actions that should be performed on a drawing that is to be converted, prior to the conversion taking place. The
Drawing_Name string variable contains the name of the current drawing without extension including the full path. This way, actions
can be executed depending on the drawing name, section or even view type. In the example below all the pos-numbers are removed
before the drawing is converted.

Label 2

partition f=100,a1=posnummer

kill p

exit

Label 3 - Post-conversion actions

The extra actions that have to be performed on a converted drawing are specified under 'Label 3'. The Dxf_Name string variable
contains the name of the drawing that has just been converted, plus the complete path. An extra action may consist of, for example,
copying (name) or moving (location). The next example shows how all exported drawings are copied to a specific location with the
project name added in front of the name of the DXF/DWG file:

Label 3

cpos(Dxf_name,'/sheet\')

s10=env(NCGPATH)

s20=file(s10)

s30=file(Dxf_Name)

s30='E:\projects\dxf-files\'//s20//'-'//s30

:cp ^dxf_name ^s30

exit

Navigation: Interfaces & Integration > DXF / DWG Integration > 2D Export > Influencing the Export Process
Influencing the Export Process
In the 2D Export function there are a number of positions in the export process at which influence can be taken on the result of the
export. Most of these positions are ruled by the configuration macro %ncghelps%\dxf\dxf-<configuration name>.cfg. These
configuration files contain each three mandatory labels and two optional labels which influence the export process.

There is also an optional macro %ncghelps%\dxf\dxfmanipulate.cmd with which influence can be taken on the export process.

Navigation: Interfaces & Integration > DXF / DWG Integration > 2D Export > Influencing the Export Process > Configuration
Files

file:///C:/Users/cua54/AppData/Local/Temp/06BBHVKN.htm 4/18/2021
DXF / DWG Integration Page 21 of 34

Configuration Files
The mandatory label must be in the configuration files and they are always called. The optional labels are each controlled by a
variable which must have a certain value (set in label 1) in order for the label to be called.

Label 1 (mandatory)

Initialization label in which Eagle environments can be set or changed which influence the Eagle export command. Also the user
can set some variables which control certain behavior (filtering, renaming, etc.) in the export process.

Label 1 is executed only once after choosing a configuration or after starting the function to set settings which are valid for all
chosen drawings to be exported. So this label is not executed for each drawings.

Label 2 (mandatory)

This label is executed before each chosen drawing just before the Eagle export command is executed. At that moment all expanding
of sub models, modifications (fragments, colors, dash patterns, etc. ) and removing of objects has been done.

Label 3 (mandatory)

This label is executed for each drawing chosen to be exported, after the Eagle export command is executed and the DXF/DWG file
has been generated. With this macro the generated DXF/DWG file can be renamed, copied, moved etc.

Label PreCheck (optional)

If label 1 contains the setting PreCheckName=TRUE the label PreCheck should exist in the configuration file. It is then executed
before the drawing is loaded and thus before label 2 is called.

Only the name of the drawing has been established and the extension of the result (DXF/DWG). If PreCheckName is set to FALSE
in the label PreCheck then the drawing is not exported at all. This method can be used to determine which drawing has to be
exported and which not. Even a document management system ( PDM ) can be used to determine which of the selected drawing has
to be exported and which not.

Label Specialexp (optional)

In case label 1 contains the setting Special_Act with value ‘yes’ or ‘true’ the label specialexp should exist in the configuration file.
This label is then executed before label 2 is called.

The drawing is loaded but is not yet expanded and thus the drawing still contains all kind of sub models. No filtering or modification
has been done yet. Only in case the variable prevbluelines is set to yes in label 1, the drawing has been expanded and some blueline
(background lines) drawings have been loaded. This setting is for a special case which is rarely used any more. Mind you, this is not
the setting bluelines which can be used more often. So normally no expanding has been done.

Navigation: Interfaces & Integration > DXF / DWG Integration > 2D Export > Influencing the Export Process > Macro
dxfmanipulate.cmd
Macro dxfmanipulate.cmd
The macro %ncghelps%\dxf\dxfmanipulate.cmd, if available, is executed before each drawing is exported. For this to happen the
variable expandsubmod has to be set to yes (default) or ok in label 1 of the used configuration file.

This macro is called from the export to DXF/DWG function as well as from the plot function.

In case the macro is called from the export function sub models have been expanded at the moment the macro dxfmanipulate.cmd is
executed. However in case the part are placed in specific layers by using the variable spec_name in the configuration file the
drawing contains still some sub models with their Eagle attribute information. For example sub models in the mod2d folder, plantek
models, part label symbols.

The macro dxfmanipulate.cmd knows the chosen configuration by means of the string configuration.

If the spec_name variable is not used all sub models are expanded. This means that some parts have lost their Eagle attribute

file:///C:/Users/cua54/AppData/Local/Temp/06BBHVKN.htm 4/18/2021
DXF / DWG Integration Page 22 of 34

information and cannot be selected as such anymore.

The next example shows an example of dxfmanipulate.cmd where parts in fragment 73 are put in fragment 110. If the configuration
equals to ‘some configuration’, the selection is a bit more specific.

if configuration='some configuration' then

{
partition f=73,a9=*holindication*
modify f=110
}
else
{
partition f=73
modify f=110
}
exit

Normally hole indications are filtered out by the export process and by putting them in a fragment which is not filtered out the hole
indications remain in the drawing.

Navigation: Interfaces & Integration > DXF / DWG Integration > 3D Export
3D Export
By means of the option "File" -> "Export" -> "DXF/DWG" in 3D-Show it is possible to export 3D data to the DXF/DWG format.

There is no possibility to use configuration files here. Only the name of the DXF/DWG file and the output format can be specified.

Navigation: Interfaces & Integration > DXF / DWG Integration > 3D Export > Destination
Destination
The DXF/DWG file will be stored in the active section directory.

Navigation: Interfaces & Integration > DXF / DWG Integration > Import
Import
By means of the "File" -> "Import" -> "DXF/DWG" option, it is possible to import drawings that have been saved in the DXF/DWG
format.

Source Path

Use the option 'Default Path For Import' in function "Import/Export" -> "DXF/DWG" -> "Import" in the System Management
application to determine a central import directory. As a default the DXF/DWG files in the currently active section directory will be
displayed in the selection list of the import DXF/DWG panel. The path to the import directory can be changed manually in the input
field below 'DXF/DWG files' text.

file:///C:/Users/cua54/AppData/Local/Temp/06BBHVKN.htm 4/18/2021
DXF / DWG Integration Page 23 of 34

The DXF/DWG file should have the .dxf or .dwg extension respectively.

Destination

The converted files are placed in the overig sub-directory of the 2D-Contek application. For example, if the 3D-Contek is the active
application, the converted files are placed as "mod" files in the 2d/overig directory. This way the drawing can be loaded with "File" -
> "Open Drawing" function in the 2D-Contek application by selecting the 'Other' group.

Navigation: Interfaces & Integration > DXF / DWG Integration > Import > Import Settings
Import Settings
Prior to the import, the user can specify a number of variables. The variables to be specified are included in 'Label 4' of the
configuration file dxf-<configuration_name>.cfg.

Dxf_expand = yes | clean | no (default)

If the setting dxf_expands is not set or it is set to no, the block references in the DXF/DWG are imported as references to sub-
models in the CADMATIC Hull drawing.

So, for each AutoCAD block definition a sub-model is generated in the 2d\overig directory. If this variable is set to yes or clean, the
block references in a DXF/DWG file are expanded during the import process. So, in this case the drawing in CADMATIC Hull
contains no references to sub-models anymore and also no sub-models will be generated in the 2d\overig directory.

After importing with dxf_expands set to no, the referenced sub-models in the directory 2d\overig should not be removed. If
the drawing is copied the referenced sub-models must be copied too.

Tworuns = yes | no (default)

If this setting is set to yes a scan of the file is performed before the actual importing.

In this scan information about the used layers and line types is gathered and written to the files designated by the environment
variables scanlayer and scanlinetype. If tablayer and scanlayer or tabdash and scanlinetype designate the same file, this information
is used in the actual import. These newly generated files can be helpful to create correct tabfiles for importing drawings from this
provider which delivers, also in the future, his DXF/DWG files with the same layer and line type arrangements.

Of course, it would be better to make arrangements about the used layers and line types with a particular provider because,
with the method mentioned here, only the used layers and line types are scanned. Thus in the case a drawing was used for
scanning in which not the full set of layers or line types has been used, the generated tabfiles will not be complete for all
cases.

The imported drawing is present and contains the same line types and fragments as present in the generated tabdash and tablayer
files. For that reason this drawing can be helpful to make the proper configuration.

Spec_name = <filename>

With this setting it is possible to perform in an easy way color or fragment changes on the imported drawing by means of the
specified mapping file.

The conversion is activated by specifying the name of the file that contains the details of the conversion, in the configuration file
dxf-<configuration_name>.cfg. This is done by including the line Spec_name=<filename> under 'Label 4'. The name of the file,
<filename>, can be specified by the user. When <filename> contains no extension, it is assumed to be ".dat". For details see: Import
from layers.

Special_Act = yes | no (default)

If this setting is set to yes, the configuration file dxf-<configurationname>.cfg should contain the label SPECIALIMP. This label is
then executed just after the import.

So, no further actions like colour conversion, fragment changes (other than the ones defined in the tablayer file) by means of the
spec_name setting, have been performed yet. For example if the configuration file contains the line special_act='yes' the label
SPECIALIMP could be used to add attribute information to the elements imported from the DXF/DWG file with code like:

file:///C:/Users/cua54/AppData/Local/Temp/06BBHVKN.htm 4/18/2021
DXF / DWG Integration Page 24 of 34

par f=0,30

mod f=30

mod a9='nupaslayer'

mod a10='Layer30'

bac p

bac r

par f=1

mod f=30

mod a9='nupaslayer'

mod a10='Construction contours'

bac p

bac r

par f=2

mod f=30

mod a9='nupaslayer'

mod a10='Hole'

bac p

bac r

par f=3

mod f=30

mod a9='nupaslayer'

mod a10='Staircase'

bac p

bac r

This could be used in combination with a specific tablayer file. For example, map the AutoCAD layer "Construction contours" into
fragment 1, the layer "Holes" into fragment 2 etc. and the layer names defined in the System Management application option
"Drawings" -> "Layer Definition". Then the "View" -> "Presentation Filters" -> "Layers Control" option can be used to switch
layers on and off.

Personal macros (Label 5 and Label 6)

In addition to the default variables, the user can also create a number of personal macros and include these under labels 5 and 6 of
the configuration file.

file:///C:/Users/cua54/AppData/Local/Temp/06BBHVKN.htm 4/18/2021
DXF / DWG Integration Page 25 of 34

Label 5 - Pre-conversion actions

Include extra actions that have to be executed on a drawing that is to be converted, prior to the conversion. The Drawing_Name
string variable contains the name of the currently active drawing without extension. The current path at that moment is: <building
number>\<section>\2d\overig. For example, it is possible to change the name of the drawing by changing the value of this variable.

Label 6 - Extra actions after conversion

Accommodate extra actions that have to be performed on a converted drawing. Here one can think of copy or shift actions. Also, all
manipulations by means of standard Hull macro commands are possible. For example all drawing entities can be put in fragment 30
in order to be able to use the 2D drawing options of CADMATIC-Hull:

label 6

sel all

modify f=30

save ^Dxf_name,

exit

The drawing has to be saved after manipulations with the save command.

If 'Label 6' contains no actions, the drawing is automatically saved in the sub-directory <building number>\<section>\2d\overig. The
name of the drawing is specified in the Drawing_name string variable, without a path or extension. The current path at that moment
is <building number>\<section>\2d\overig. Also the variable DXF_name can be helpful. It contains the name of the selected
DXF/DWG file (also without path or extension).

In 'Label 6' Drawing_name already contains the extra section number in front of the name of the imported DXF/DWG file,
which is automatically added by CADMATIC Hull.
Navigation: Interfaces & Integration > DXF / DWG Integration > Variables
Variables
This section provides an overview of all the variables that can be specified. For each variable, an indication is given of the label(s)
under which it occurs, a description of the variables is given, and a list of the possible and default values is presented.

Bluelines

Dxfversion

Expandsubmod

Removehatch

RemovePrHatch

Removefr7hatch

Special_act

SelectByColor

Spec_name

Tworuns

file:///C:/Users/cua54/AppData/Local/Temp/06BBHVKN.htm 4/18/2021
DXF / DWG Integration Page 26 of 34

NoDXFDump

NupasLayerCtr

Dwg_message_level

Dwg_scan_mode

Dxf_color_by_layer

Dxf_expand

Dxf_filter

Dxf_layer_range

Export_filter

AExport_polyline

Scanlayer

Scanlinetype

Tablayer Tabdash Tabfont

Navigation: Interfaces & Integration > DXF / DWG Integration > Variables > Bluelines
Bluelines
Indicates whether for plates and brackets in section the real thickness is exported by two lines (yes) or that only one line is exported
(no or yes_m).

With the setting yes_m a line on the measure side of the part is exported.

Name Place (label)Possible valuesDefault


bluelines1 Yes/Yes_m/No Yes

Navigation: Interfaces & Integration > DXF / DWG Integration > Variables > Dxfversion
Dxfversion
Specifies whether AutoCAD 12, 14 or 2000\2002 compatible DXF/DWG are generated.

Name Place (label)Possible valuesDefault


dxfversion1 12/14/2000 2000

Navigation: Interfaces & Integration > DXF / DWG Integration > Variables > Expandsubmod
Expandsubmod
Controls the expansion of sub-models before the drawing is exported.

Name Place (label)Possible valuesDefault


expandsubmod1 Yes/No Yes

Navigation: Interfaces & Integration > DXF / DWG Integration > Variables > Removehatch
Removehatch
Controls the filtering of hatches and colour fills.

Name Place (label)Possible valuesDefault

file:///C:/Users/cua54/AppData/Local/Temp/06BBHVKN.htm 4/18/2021
DXF / DWG Integration Page 27 of 34

removehatch1 All/Yes/No No
Navigation: Interfaces & Integration > DXF / DWG Integration > Variables > RemovePrHatch
RemovePrHatch
Controls the filtering of hatches and colour fills of plates, brackets and profiles in section.

Name Place (label)Possible valuesDefault


removeprhatch1 Yes/No No

Navigation: Interfaces & Integration > DXF / DWG Integration > Variables > Removefr7hatch
Removefr7hatch
Controls the filtering of title field hatches and colour fills.

Name Place (label)Possible valuesDefault


removefr7hatch1 Yes/No No

Navigation: Interfaces & Integration > DXF / DWG Integration > Variables > Special_act
Special_act
If this variable is set to yes in label 1, the configuration file should contain the label SPECIALEXP. Under this label, actions can be
carried out in the export process at the moment that the drawing is loaded. No further actions like expanding submodels, removing
hatches has been performed yet.

If used under label 4, the configuration file should contain the label SPECIALIMP in which actions can be executed just after
importing the drawing, no further conversion like color or layer changes have been performed.

Name Place (label)Possible valuesDefault


special_act1/4 yes/no no

Navigation: Interfaces & Integration > DXF / DWG Integration > Variables > SelectByColor
SelectByColor
This variable is being used to indicate that a conversion based on the color of elements is started. Then all submodels will be
expanded.

Name Place (label)Possible valuesDefault


SelectByColor1 False/True False

Navigation: Interfaces & Integration > DXF / DWG Integration > Variables > Spec_name
Spec_name
This variable is being used to indicate which <filename>.dat has to be used in the conversion.

Name Place (label)Possible valuesDefault


spec_name1/4 file name

Navigation: Interfaces & Integration > DXF / DWG Integration > Variables > Tworuns
Tworuns
Indicates whether a scan import should be performed before really importing.

Name Place (label)Possible valuesDefault


tworuns4 Yes/No Yes

Navigation: Interfaces & Integration > DXF / DWG Integration > Variables > NoDXFDump

file:///C:/Users/cua54/AppData/Local/Temp/06BBHVKN.htm 4/18/2021
DXF / DWG Integration Page 28 of 34

NoDXFDump
Indicates whether a dump and etch has to be performed in the export process.

Name Place (label)Possible valuesDefault


NoDXFDump1 True or False True

Navigation: Interfaces & Integration > DXF / DWG Integration > Variables > NupasLayerCtr
NupasLayerCtr
Indicates whether or not elements in 2D or Plantek sub models must receive the "layer control" identification of the submodel when
the sub model is expanded.

Name Place (label)Possible valuesDefault


NupasLayerCtr1 True or False False

Navigation: Interfaces & Integration > DXF / DWG Integration > Variables > Dwg_message_level
Dwg_message_level
Indicates which system messages are being displayed during the conversion.

Name Place (label)Possible valuesDefault


%dwg_message_level%1/4 0 to 4 4

Navigation: Interfaces & Integration > DXF / DWG Integration > Variables > Dwg_scan_mode
Dwg_scan_mode
When this variable has been set to yes, the DXF/DWG will not be converted but a file is being created which contains the layer
information of the file to be imported and the used line types.

Name Place (label)Possible valuesDefault


%dwg_scan_mode%4 Yes/No/'' ''

Navigation: Interfaces & Integration > DXF / DWG Integration > Variables > Dxf_color_by_layer
Dxf_color_by_layer
Controls the way a colour is assigned to a drawing element.

Name Place (label)Possible valuesDefault


%dxf_color_by_layer%1 yes/no no

Navigation: Interfaces & Integration > DXF / DWG Integration > Variables > Dxf_expand
Dxf_expand
Should the block references present in a DXF/DWG file be expanded or not?

Name Place (label)Possible valuesDefault


%dxf_expand%4 Yes/No/clean Yes

Navigation: Interfaces & Integration > DXF / DWG Integration > Variables > Dxf_filter
Dxf_filter
Which elements should be imported.

Name Place (label) Possible values Default


%dxf_filter%4 number containing 16 times a " 1" or "0"1111111111111111

file:///C:/Users/cua54/AppData/Local/Temp/06BBHVKN.htm 4/18/2021
DXF / DWG Integration Page 29 of 34

In the value for this environment a 1 indicates that a particular AutoCAD entity is imported into Hull and a 0 means that it is not
imported. The following table gives an overview of the entities and the corresponding position in the dxf_filter string:

position in the string Hull entities


0 insert
1 point
2 line
3 polyline
4 circle
5 arc
6 text
7 shape
8 trace
9 solid
10 line3D
11 face3D
12 dimension
13 attribute
14 light-weight polyline
15 hatch

Navigation: Interfaces & Integration > DXF / DWG Integration > Variables > Dxf_layer_range
Dxf_layer_range
Indicates which Hull fragments may be used in the conversion.

Name Place (label)Possible valuesDefault


%dxf_layer_range%4 0/128 0/128

Navigation: Interfaces & Integration > DXF / DWG Integration > Variables > Export_filter
Export_filter
Indicates which Hull elements have to be exported.

Name Place (label) Possible values Default


%export_filter%1 number containing 12 times "1" or "0"111111111111

In the value for this environment a 1 indicates that a particular Hull entity is written to the DXF/DWG file and a 0 means that it is
not written. The following table gives an overview of the entities and the corresponding position in the export_filter string:

positions in the string Hull entities


0 vector
1 circle/arc
2 point
3 annotations
4 faces
5 submodels
6 dimensions
7 extrusions
8 irregular solids
9 cylinders
10 reducers/ecc.reducers/dished ends/pipebends
11 ufos.

Navigation: Interfaces & Integration > DXF / DWG Integration > Variables > AExport_polyline
AExport_polyline
Specifies the way in which lines consisting of multiple vectors (polylines) are exported.

Name Place (label) Possible values Default


%export_polyline%1 2D_ONLY/3D_IF_CONTINUOUS/3D_ONLY3D_ONLY

file:///C:/Users/cua54/AppData/Local/Temp/06BBHVKN.htm 4/18/2021
DXF / DWG Integration Page 30 of 34

Navigation: Interfaces & Integration > DXF / DWG Integration > Variables > Scanlayer
Scanlayer
Refers to the file to be created in the scan mode concerning the used layers in the DXF/DWG file.

Name Place (label) Possible values Default


%scanlayer%4 filelocation\filename

Navigation: Interfaces & Integration > DXF / DWG Integration > Variables > Scanlinetype
Scanlinetype
Refers to the file to be created in the scan mode concerning used the line types in the DXF/DWG file

Name Place (label) Possible values Default


%scanlinetype%4 filelocation\filename

Navigation: Interfaces & Integration > DXF / DWG Integration > Variables > Tablayer Tabdash Tabfont
Tablayer Tabdash Tabfont
References to the tab files to be used.

Name Place (label)Possible valuesDefault


%tablayer%,%tabdash% %tabfont%1/4 full path to file

Navigation: Interfaces & Integration > DXF / DWG Integration > Sample Configurations
Sample Configurations
In the System Management option "Import/Export" -> "DXF/DWG" -> "Configurations" it is possible to generate the relevant files
for five sample export and an import configurations in the %ncghelps%\dxf directory:

general With this configuration the result is as close as possible to the drawing on the screen.
plotlines Can be used when only one line must be exported and not the normal lines used for plates and brackets in section.
nohatches Hatches and solid fills are not exported while using this configuration
special This is a special configuration in which specific parts are put into specific layers and also the blue lines are used.
color This is also a special configuration with which parts with a specific color are gathered in a specific layer
With this example DXF/DWG files can be imported and elements will get a layer identification so that it can be used with
import
"Object control" and "Layer control".

All example configurations deliver an AutoCAD 2000/2002 compatible DXF/DWG file, by setting the variable DxfVersion=2000 in
label 1 of the .cfg file.

The option "Import/Export" -> "DXF/DWG" -> "Configurations" can also be used to add these six examples to the existing

file:///C:/Users/cua54/AppData/Local/Temp/06BBHVKN.htm 4/18/2021
DXF / DWG Integration Page 31 of 34

configuration selection list. It is also possible to create a new list with only these examples.

Navigation: Interfaces & Integration > DXF / DWG Integration > Sample Configurations > general
general
With this configuration the resulting DXF/DWG is as closely as possible to the drawing on the screen. No special filtering is
applied. The "general" configuration consists of the following files:

l dxf-general.cfg
l tablayerexpgeneral.dat
l tabdashexpgeneral.dat
l tabfontexpgeneral.dat
l tablayerimpgeneral.dat
l tabdashimpgeneral.dat
l tabfontimpgeneral.dat

in the %ncghelps%\dxf directory.

If this configuration is used for exporting from CADMATIC Hull and for importing the exported drawing back into CADMATIC
Hull all elements will be again in the same fragments.

If however this configuration is used only for importing DXF/DWG files with unknown layer, line type arrangements, Tworuns
should be set to yes and the %scanlayer% and %scanlinetype% variables can designate respectively the same file as %tablayer% and
%tabdash% do.

Navigation: Interfaces & Integration > DXF / DWG Integration > Sample Configurations > Plotlines
Plotlines
With this configuration the resulting DXF/DWG contains only one line indicating the plates and brackets in section and not the two
lines normally used to indicate the real thickness in the drawing.

The "plotlines" configuration consists of the following files:

l dxf-plotlines.cfg
l tablayerexpplotlines.dat
l tabdashexpplotlines.dat
l tabfontexpplotlines.dat
l tablayerimpplotlines.dat
l tabdashimpplotlines.dat
l tabfontimpplotlines.dat

in the %ncghelps%\dxf directory.

The file dxf-plotlines.cfg contains the line:

bluelines='no'

below label 1 which is responsible for the change of the used lines.

Navigation: Interfaces & Integration > DXF / DWG Integration > Sample Configurations > nohatches
nohatches
With this configuration all hatches and solid fills are filtered out of the drawing. It depends on the kind of object if some contour is
left or nothing at all is left behind.

The " nohatches" configuration consists of the following files:

l dxf-nohatches.cfg
l tablayerexpnohatches.dat
l tabdashexpnohatches.dat

file:///C:/Users/cua54/AppData/Local/Temp/06BBHVKN.htm 4/18/2021
DXF / DWG Integration Page 32 of 34

l tabfontexpnohatches.dat
l tablayerimpnohatches.dat
l tabdashimpnnohatches.dat
l tabfontimpnohatches.dat

in the %ncghelps%\dxf directory.

The file dxf-nohatches.cfg contains the following lines:

l removehatch='all'
l removefr7hatch='yes'
l removeprhatch='yes'

below label 1 which trigger the filtering mechanism.

Navigation: Interfaces & Integration > DXF / DWG Integration > Sample Configurations > special
special
With this configuration specific objects are put together in a specific layer. Also the so-called "blue-lines" are exported instead of
the normal single line. The "special" configuration consists of the following files:

l dxf-special.cfg
l special.dat
l tablayerexpspecial.dat
l tabdashexpspecial.dat
l tabfontexpspecial.dat
l tablayerimpspecial.dat
l tabdashimpspecial.dat
l tabfontimpspecial.dat

in the %ncghelps%\dxf directory.

The file dxf-special.cfg contains the line:

spec_name='special.dat'

below label 1 which triggers the filtering mechanism and point to the file containing the layer specifics.

Navigation: Interfaces & Integration > DXF / DWG Integration > Sample Configurations > Color
Color
With this configuration objects with a specific colour are put together in a specific layer. The "color" configuration consists of the
following files:

l dxf-color.cfg
l color.dat
l tablayerexpcolor.dat
l tabdashexpcolor.dat
l tabfontexpcolor.dat
l tablayerimpcolor.dat
l tabdashimpcolor.dat
l tabfontimpcolor.dat

in the %ncghelps%\dxf directory.

The file dxf-color.cfg contains the lines:

spec_name='color.dat'

SelectByColor=TRUE

file:///C:/Users/cua54/AppData/Local/Temp/06BBHVKN.htm 4/18/2021
DXF / DWG Integration Page 33 of 34

below label 1 which triggers the filtering mechanism and point to the file containing the layer specifics.

Navigation: Interfaces & Integration > DXF / DWG Integration > Sample Configurations > import
import
With this configuration a DXF/DWG file can be imported. The "import" configuration consists of the following files:

l dxf-import.cfg
l tablayerexpimport.dat
l tabdashexpimport.dat
l tabfontexpimport.dat
l tablayerimpimport.dat
l tabdashimpimport.dat
l tabfontimpimport.dat

in the %ncghelps%\dxf directory.

The file dxf-import.cfg contains the line:

special_act=yes

below label 4 which activates the use of the label SPECIALIMP in the dxf-import.cfg file. This label contains the changes necessary
to add layer information to the imported objects. In this example the elements in the first 50 fragments receive extra attribute
information.

label SPECIALIMP

par f=1

mod a9='nupaslayer'

mod a10='Layer1'

bac p

bac r

par f=2

mod a9='nupaslayer'

mod a10='Layer2'

bac p

bac r

...

par f=49

mod a9='nupaslayer'

mod a10='Layer49'

bac p

bac r

par f=50

file:///C:/Users/cua54/AppData/Local/Temp/06BBHVKN.htm 4/18/2021
DXF / DWG Integration Page 34 of 34

mod a9='nupaslayer'

mod a10='Layer50'

bac p

bac r

exit

With the used tablayer file tablayerimpimport.dat the AutoCAD layers are mapped to the Hull fragments, after which the label
SPECIALIMP is used to add the attribute data containing the layer names. In this case attribute 9 has to have the value "nupaslayer"
while the contents of attribute 10 can be chosen freely.

If the used layer names are corresponding with the used names in "Layer control" or "Object control" these functions can be helpful
to control the different items.

file:///C:/Users/cua54/AppData/Local/Temp/06BBHVKN.htm 4/18/2021

You might also like