Re-Mapping ByLevel Color When Saving To DWG [CS]


 Product:MicroStation
 Version:V8 2004, XM, V8i, CONNECT
 Environment:N\A
 Area:DWG
 Subarea:Save


  

This Client Server article is republished in its entirety from 2004 for reference purposes.

By Bentley Technical Support Group
02 January 2004 Modified: 12 January 2005

Re-Mapping ByLevel Color

Have you ever had trouble re-mapping ByLevel color when saving to DWG? If so, this article will guide you through that task.

Whenever the Levels Mapping table is used for ByLevel color, the mapping of the color will come from the original file.

For example, look at the process of saving a DGN file to a DWG file. If the ByLevel color of Level 1 is set to "3" in the DGN file, and the ByLevel color in the Level Mapping table is set to "1", the color will be re-mapped to blue (MicroStation Color 1)- not to the red (AutoCAD Color 1) that was expected. The blue color is coming from the active MicroStation Color table, which was used in the DGN file.

In the .csv file you will need to use two of the eight tabs: Levels and Colors. Here are the steps for setting up the .csv file:

  1. In the Levels Mapping table, place the original level name in the Level column. This will be the level name in the DGN drawing file.
  2. Place the name of the level for the DWG drawing file in the DWGOutputLayer. This will be the name that you want the DWG drawing file to use.

  3. Fill in the ByLevel columns, leaving the Color column blank. These columns can remain blank if no style and weight are assigned to the level. 

      
  4. Switch to the Color Mapping table and place a check mark in "Show Optional Columns." By checking this box, you can now use re-mapping qualifiers.
  5. Place "%unmapped" in the Color column. "%unmapped" tells the Mapping table that you want to choose any color that is not already mapped.
  6. Place the original level name in the Level column, the first column in the Optional Columns. The level name used here is the original level name. This limits this entry in the mapping table so that it only applies to elements on this level.

  7. Place "95" in the ElementType column. This is the element type number for levels. Using Element Type 95 here will mean that that entry in the Mapping table will only apply to Element Type 95 (levels) and not to any other elements.

    Note: The combination of the two qualifiers, levels, and element type means that the entry is effecting only level information (Element Type 95) on the level specified in the Level column.

  8. Place the desired color for the ByLevel color in the DWGOutputColor column. Make sure to include the suffix "ac." This will ensure that the AutoCAD color is used. When MicroStation saves files to DWG, by default it maps the color indices in the DGN color table to the closest color in the (fixed) AutoCAD color table. If the DWGOutputColor entry is a color in the file's color table, simply enter the number of the color in the DWGOutputColor column. If a fixed index in the AutoCAD color table is desired (i.e. if you do not want the color matching to be applied), enter the AutoCAD color number with the suffix "ac" (e.g. "15ac").
  9. Add "%unmapped" in the level column and "%ByLevel" in the DWGOutputLayer to have the elements use the ByLevel settings.
  10. Repeat steps 4-8 for each of the levels needed.

By using the re-mapping qualifiers, we are able to assign an AutoCAD color to the Mapping table and have it map to the correct AutoCAD color. We do this by selecting a color using a specific Level name and an element type to be mapped to an AutoCAD color.

See also

Other language sources

 Original Author:Bentley Technical Support Group