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.

Note: 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.

Note: It is recommended 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:

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.

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

 }

Note: 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).

Note: 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.