How to Configure Mapping for DWG to DGN Conversion
The DGN Converter uses mapping rules to specify how DWG entities and properties are converted to DGN entities and properties, for example which DGN level to use for each drawing layer. The DGN Converter window has a button to open an editor for each available mapping. The actual mapping rules are stored in separate DBF files in the <EDS>\DGNConverter directory.
Map DWG Line Type to DGN Line Style
You can map each DWG line type to a DGN line style. In the default mapping file, common DWG line types are mapped to their closest suitable line styles in DGN. You can change these mappings to suit your individual requirements.
If you use DWG line types that are not currently listed, you can add a new line type to line style mapping rule by pressing "Add new line type".
Map DWG Line weight to DGN Line weight
You can map each DWG line weight to a DGN line weight. In the default mapping file, all of the possible DWG line weights are mapped to their closest suitable Line weight values in DGN. You can change these mappings to suit your individual requirements.
The DWG Line Weight column contains the entire set of line weights that are visible to EDS so you cannot add new entries to the line weight table, you can only change the DGN line weight that each is mapped to.
Map DWG Text Style to DGN Text Style
You can map each DWG text style and optionally a specific justification to a DGN text style. The DGN text style to be used must be present in the base DGN file. If the style does not exist in the base file, then the individual properties of the DWG text style will be set to the DGN text without setting a text "style". The same occurs when there is no mapping for a particular DWG text style.
In each text style mapping the DWG Justification field is optional. If the mapping specifies a DWG justification, then only DWG text with the specified style and justification will be mapped to the specified DGN text style. If the DWG justification field is left empty then DWG text with the specified style and any justification will be mapped to the specified DGN text style. A mapping that specifies the correct DWG justification will be used in preference to a mapping that does not specify the justification.
In the following example, DWG text using style "Standard" and Left justification would be mapped to DGN text style "LeftStandard" by the first mapping. DWG text using style "Standard" and Right justification would be mapped to DGN text style "GenericStandard" by the third mapping, and DWG text using style "TitleText" and any justification would be reproduced by applying the DWG text properties to the DGN text without using a DGN text style.
In the default mapping file there are no text style mappings, so all text is reproduced by applying DWG text properties to the DGN text. The supplied metric and imperial base DGN files do not contain any text styles.
You can add text style mappings by pressing "Add new text style" and entering the appropriate DWG text style name, DWG justification and desired DGN text style.
Map DWG Color to DGN Color
You can map each DWG color, specified as an AutoCAD Color Index (ACI), to a DGN color. In the default mapping file, all of the possible DWG colors are mapped to their closest suitable color values in DGN. You can change these mappings to suit your individual requirements.
The DWG Color column contains the entire set of AutoCAD color indicies that are visible to EDS, so you cannot add new entries to the color mapping table, you can only change the DGN color number that each is mapped to.
Map DWG Layer to DGN Level
You can map each DWG layer to a DGN level either by name or by number:
Mapping a DWG layer to a DGN level by name.
A named level can be created in the DGN file for each specified mapping, if it does not already exist in the base DGN file. The DGN level name does not need to be the same as the DWG layer name.
e.g. If DWG layer "xref" is mapped to DGN level "xref" then a level named "xref" will be created in the DGN file. All the properties of DWG layer "xref" will be copied into DGN level "xref". In cases the DWG layer "xref" is not found, the properties will not be set of DGN level "xref" and you should expect their DGN defaults.
Mapping a DWG layer to a DGN level by number.
Mapping by number means that you can map a DWG layer to a DGN level based on its level number.
Note that you can have a level named "4" and also a different level which is number 4. The level number is different from the level name. You can specify a mapping rule to map to a level which occurs at a specific number in DGN file.
If you map to a level by number then that numbered level must exist in the base DGN file. If the specified level number is not available then all the entities placed mapped to this numbered level will go to the "default" or 0 level in the DGN file.
All the entities which are on a DWG layer will be placed on the mapped DGN level, unless there is a mapping for that specific entity type - see Map DWG Entity to DGN Level, below. Entity to level mapping overrides layer to level mapping.
You can specify a new DWG layer to DGN level mapping rule. Note that you can only map to a DGN level either by name or by number. Having values in both columns in the mapping file is an error and you will be notified by the system if it happens. Similarly, you must specify a mapping in at least one column and you cannot leave both fields empty.
Map DWG Entity to DGN Level
You can map DWG entities based on their entity type to a DGN level. For example, you can specify if you want all LINE entities to be placed on a DGN level named "Wires" or if you want all INSERT (inserted block) entities to be placed on a DGN level numbered 3.
All of the named levels mentioned in the DWG entity to DGN level map are created before processing the drawing entities, regardless of whether or not there were entities to map to those levels.
If the levels specified in this entity to level map do not also exist in the layer to level map then the created DGN level will be turned off. The mapped levels have no DWG layer from which to copy their properties. You can turn them on in the final DGN to view the entities which now belong to the created levels.
You can specify a new rule for mapping DWG entities to DGN levels. The same restrictions that are discussed above in DWG layer to DGN level mapping apply to the entity to level mapping: you must specify only one of either the level name or level number for each mapping.
Note: DWG entity to DGN level mapping overrides DWG layer to DGN level mapping rules.
Consider this scenario: There are LINEs and CIRCLEs on layer 4 in the DWG file. According to DWG layer to DGN level mapping rules everything on layer 4 should go to level named "4" but the DWG entity to DGN level mapping states that all LINE entities should go to DGN level named "Wires". In the converted DGN files, the lines will be created on level "Wires" and the circles will be created on level "4".