Configuration Files
Before starting The Import Process or The Export Process, a number of definitions must be made or must be present. These definitions can be made in the various configuration files which are used by the conversion process.
The files with the names of dxf-<configuration_name>.cfg will be used in the conversion. These files are located in the %ncghelps%\dxf folder.
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
- Label 1 : Variables to which a value has been assigned.
- Label 2 : Pre-conversion actions for each drawing.
- Label 3 : Post-conversion actions for each drawing.
Import
- Label 4 : Variables to which a value has been assigned.
- Label 5 : Pre-conversion actions for each drawing.
- Label 6 : Post-conversion actions for each drawing.
The variables that can be specified under labels 1 and 4 are explained in 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.
Click below for an example file for general export/import purposes.

# name : dxf-general.cfg
# date : 13-03-2007, Numeriek Centrum Groningen B.V.
# purpose : Configuration macro used by the import/export of DXF/DWG files.
# note : The labels 1, 2 and 3 are related to the export to DXF/DWG,
# labels 4, 5 and 6 to the import of DXF/DWG.
# This file will deliver a AutoCAD 2000 compatible DXF/DWG file.
Label 1
{
# Actions which have to be carried out one time or settings which are valid
# for all drawings which have to be exported to DXF\DWG.
#
# Environmentvariables used by the export command of Eagle.
STRING DummyPath
DummyPath=env(NCGHELPS)'/dxf'
environment DXF_LAYER_RANGE
=0\128
environment DWG_EXPORT_DIMENSION=yes
environment DWG_EXPORT_FACE=yes
environment DWG_MULTILINETEXT=yes
environment XREF_ALLOWED=yes
environment EXPORT_DIMENSION_WITH_BLOCK=yes
environment TABLAYER
='^DummyPath/tablayerexpgeneral.dat'
environment TABDASH
='^DummyPath/tabdashexpgeneral.dat'
environment TABFONT
='^DummyPath/tabfontexpgeneral.dat'
environment TABHATCH
='^DummyPath/tabhatchexpgeneral.dat'
environment EXPORT_FILTER
='111111111111'
BlueLines
='yes'
removehatch
='no'
removefr7hatch
='no'
removeprhatch
='no'
DXFVersion
=2000
exit
}
Label 2
# Extra actions which will be carried out on a drawing before the actual conversion.
# The string variable Drawing_Name contains the name of the drawing.
{
exit
}
Label 3
# Extra actions which will be carried out on a converted drawing. The
# string variable Dxf_Name contains the name of the current drawing.
{
exit
}
#
# The labels 4, 5 and 6 are related to the import of dxf/dwg files.
#
Label 4
.
{
# Actions which have to be carried out one time or settings which are valid
# for all drawings which must be imported.
#
# Environment variables used by the import command of Eagle
environment
DWG_SCAN_MODE
=
environment DXF_LAYER_RANGE
=0\128
environment DWG_MESSAGE_LEVEL
=4
environment DXF_EXPAND
=yes
STRING DummyPath
DummyPath=env(NCGHELPS)'/dxf'
environment SCANLAYER
='^DummyPath/tablayerimpgeneral.dat'
environment SCANLINETYPE
='^DummyPath/tabdashimpgeneral.dat'
environment TABLAYER
='^DummyPath/tablayerimpgeneral.dat'
environment TABDASH
='^DummyPath/tabdashimpgeneral.dat'
environment TABFONT
='^DummyPath/tabfontimpgeneral.dat'
environment
TABHATCH
='^DummyPath/tabhatchimpgeneral.dat'
environment DXF_FILTER
='1111111111111111'
TwoRuns
='no'
exit
}
Label 5
# Extra actions which will be carried out on a DXF/DWG file before'
# the file is imported. The variable Drawing_name contain the name'
# of the drawing to be imported.'
exit
}
Label 6
# Extra actions which will be carried out on a converted drawing. The
# stringvariable Drawing_name contains the name.
{
exit
}
---
For explanations on the environment variables, see Variables.
For information on the tab files, see Tab Files.
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 folder.
You should use configuration file names that are easily recognized for their purpose, such as:
- dxf-client_general.cfg
- dxf-client_plotlines.cfg
- dxf-client_electric.cfg
- 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.