Using Remapping Qualifiers
The basic remapping operation lets you change an element parameter to another value in the output file. However, in some situations you might not want every element with a given source value changed to the same target value. For example, you may want to move all text on Level 23 to the Annotation level, but leave the lines on Level 23 alone. You might want to change only the elements with weight 7 from color 3 to color 4, or you might want to change all elements with weight other than 2 from color 3 to color 4.
In the remapping spreadsheet, each mapping table (worksheet) has a required column (primary key) for the element parameter that is being changed. In addition, most mapping tables have optional columns for the other parameters that can be used to qualify elements that match the primary key. For example, in the Levels mapping table, the required primary key column is Level, and the optional qualifier columns are Color, Weight, LineStyle, Class, ElementType, and Cell. Similarly, for Font remapping, there are five qualifiers: Level, Color, Weight, Class, and Cell. The optional qualifier columns are hidden unless the Show Optional Columns setting is turned on.
Following are some guidelines for using the qualifier columns in the mapping tables:
- If a row contains an entry in any of the qualifier columns, then the element parameter must match that entry or it will not be remapped.
- There can be only one entry in a qualifier for each row. The spreadsheet can have as many rows as needed, with all entries the same except for a particular qualifier. For example, to change the color of all weight 5 and weight 7 elements from color 3 to color 4, use two rows: one with weight qualifier 5, and one with weight qualifier 7.
- If a row contains an entry that starts with the character ~, then the element parameter must not match the remainder of that entry or it will not be remapped. For example, to change the color of all weight 7 elements with color 3 to color 4, the Weight column would have the entry 7. To change all elements with a weight other than 2 from color 3 to color 4, the Weight column would have the entry ~2.
- If the Level qualifier is
specified as %match in the Color, Weight, or LineStyle mapping tables,
then the source parameter is set to the output parameter only if it matches the
corresponding ByLevel attribute of the element's level. This is most useful for
setting symbology to ByLevel. For example, assume that the Color Mapping Table
includes the values below.
In this case, all Color 2 elements that are on the levels that have 2 for their ByLevel color will have their colors set to ByLevel when saving to a V8 file.
For a second example, assume that the Color Mapping Table includes the values below.
In this example, remapping takes every element for which the color matches its level's ByLevel color, and changes its color to ByLevel. The same principles apply for the Weight and LineStyle Mapping tables. The Color Section describes how %unmapped and %bylevel affect the column values.
- If the value in the Color, Weight, or LineStyle qualifier column is enclosed in square brackets, remapping interprets it as an effective value. For example, if the value in the Color qualifier column is , then the remapping applies if either the element color is 2, or the element has its color set to ByLevel, and the ByLevel color of its level is set to 2.
- The Class column can either contain integer class values, or the entries Primary, Construction, or Dimension, which are class values of 0, 2, and 3, respectively.
- To determine the appropriate values for the ElementType column, select an element of the type that you want to remap, and use the Properties tool in MicroStation. The appropriate integer value appears to the right of the type name in the tree view in the left hand pane. For example, the type of Line elements is 3.
- The Cell column can be used to specify that the remapping applies only to elements that are components of cells with names matching the entry in the column. The Cell column entry can contain the asterisk character, *, which matches any zero or more characters in that position, or a question mark character ? to match any one character in that position. For example, if the Cell column contains bac*, then the remapping row applies only to elements that are components of a cell with a name that starts with bac. The cell name matching algorithm is not case sensitive.