Level Map Item

The level map item shows the on/off display state of MicroStation's design file levels within a level map variable. A level map variable is an array of four short integers with each bit designating the on/off display state of a single level. The least significant bit of the first array element corresponds to the display state of level 1


The level map item displays as an eight by eight array of numbers ranging from 1 to 63. The user turns on a level by single-clicking the data button while the cursor is over the number corresponding to the level. A range of levels is selected when the mouse is dragged over a range of numbers. Levels that are turned on are surrounded by a black rectangle. Dragging the data button with the shift button down will select a rectangular range of levels.

The active level is indicated by setting the activeLevelAccessStr field. This level will display with a surrounding black circle instead of a rectangle. The user selects the active level by double-clicking the data button. The display of the active level cannot be turned off.

Item list specification

The DialogItemRsc field extent specifies the location of the level map item. Since the width and height of a level map item is fixed, extent.width and extent.height should be set to 0.

The type field should be LevelMap.

The ID determines the DItem_LevelMapRsc instance to load.

The attributes field can be ON or OFF and optionally combined with HIDDEN. It will usually be ON.

The itemArg field is unused and should usually be set to 0.

The label field can override the label contained in the DItem_LevelMapRsc instance.

The auxInfo field can currently override only the access string contained in the DItem_LevelMapRsc instance.

The following is an example of a level map item list specification:

{{XC, YC, 0, 0}, LevelMap, LEVELMAPID_ViewLevels, ON, 0, "", ""}

Item resource specification

The level map item is defined in a resource file with the following structure:

typedef struct ditem_levelmaprsc
ULong helpInfo;
ULong helpSource;
#if defined (resource)
char label[];
char accessStr[];
char activeLevelAccessStr[];
long labelLength;
char label[1];
} DItem_LevelMapRsc;

The DItem_LevelMapRsc structure has the following unique fields. (See "Common item resource fields" for a description of any field not in this table).

Field Description
accessStr Represents a C expression that references a level map variable (an array of four short integers).
activeLevel-AccessStr Represents a C expression that references a variable that contains the current active level. The active level will be surrounded with a circle and is selected with double-click of the data button. If an active level is not applicable, specify an empty string for this field.

The following is an example of a level map item resource. This item is used in the View Levels dialog box, and is defined in MicroStation's resource file.

DItem_LevelMapRsc LEVELMAPID_ViewLevels=
NOHELP, MHELP, "View Levels",

Item hook function messages

The level map item cannot have an associated item hook function.

Level map item functions

Funtion Description
mdlDialog_levelMapGetInfo retrieves detailed information about a level map item.
mdlDialog_levelMapSetInfo sets various aspects of a level map item.

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.