Modules | Classes | Typedefs | Functions

Modules

 Level Cache
 A LevelCache provides access to level definitions.
 
 Level Filters
 
 Level Libraries
 
 Level Lists
 
 Level Tables
 

Classes

struct  LevelClassMask
 

Typedefs

typedef StatusInt(* LevelIteratorTraverseCallback )(DgnPlatform::LevelHandle levelIdHandle, CallbackArgP userArgIn)
 UserFunction called when traversing levels. More...
 

Functions

bool mdlLevel_isActive (DgnPlatform::LevelId levelIdIn)
 Check if a level of the current-file is the active level. More...
 
StatusInt mdlLevel_getActive (DgnPlatform::LevelId *levelIdOut)
 Get the current active level. More...
 
StatusInt mdlLevel_setActive (DgnPlatform::LevelId levelIdIn)
 Set level as active. More...
 
StatusInt mdlLevel_setActiveByName (DgnPlatform::LevelId, WCharCP levelNameIn)
 Set level with specified name as active. More...
 
StatusInt mdlLevel_setActiveByCode (DgnPlatform::LevelCode levelCodeIn)
 Set level with specified code as active. More...
 
bool mdlLevel_isValid (DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn)
 Check if the specified level id is a valid existing level. More...
 
bool mdlLevel_isValidByName (DgnModelRefP modelRefIn, DgnPlatform::LevelId, WCharCP levelNameIn)
 Check if level with specified name is a valid existing level. More...
 
bool mdlLevel_isValidByCode (DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn)
 Check if level with specified code is a valid existing level. More...
 
StatusInt mdlLevel_getName (WChar *levelNameOut, int stringSizeIn, DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn)
 Get level name. More...
 
StatusInt mdlLevel_getCode (DgnPlatform::LevelCode *levelCodeOut, DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn)
 Get level code. More...
 
StatusInt mdlLevel_isCodeAutoGenerated (bool *isAutoGeneratedOut, DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn)
 Get if the level code is auto generated (that means generated by MicroStation) or is manually set by the user. More...
 
StatusInt mdlLevel_getCreateTimeStamp (UInt *createTimeStampOut, DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn)
 Get level create time stamp. More...
 
StatusInt mdlLevel_getDescription (WChar *descriptionOut, int stringSizeIn, DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn)
 Get level description. More...
 
StatusInt mdlLevel_getColor (UInt *colorOut, bool *colorOverrideOut, DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn)
 Get level color and color-override flag. More...
 
StatusInt mdlLevel_getMaterialId (DgnPlatform::ElementId *materialIdOut, bool *materialOverrideOut, DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn)
 Get material id associated with the level. More...
 
StatusInt mdlLevel_getStyle (int *styleOut, LineStyleParamsP styleParamsOut, bool *styleOverrideOut, DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn)
 Get the level style, custom-line style override info and style-override flag. More...
 
StatusInt mdlLevel_getWeight (UInt *weightOut, bool *weightOverrideOut, DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn)
 Get the level weight and weight-override flag. More...
 
StatusInt mdlLevel_getSymbology (UInt *colorOut, bool *colorOverrideOut, int *styleOut, LineStyleParamsP styleParamsOut, bool *styleOverrideOut, UInt *weightOut, bool *weightOverrideOut, DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn)
 Get the level symbology and symbology-override flags. More...
 
StatusInt mdlLevel_getElementColor (UInt *colorOut, DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn)
 Get the level element color. More...
 
StatusInt mdlLevel_getElementMaterialId (DgnPlatform::ElementId *materialIdOut, DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn)
 Get level element material id associated with the level. More...
 
StatusInt mdlLevel_getElementStyle (int *styleOut, LineStyleParamsP styleParamsOut, DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn)
 Get the level element style and custom-line style override info. More...
 
StatusInt mdlLevel_getElementWeight (UInt *weightOut, DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn)
 Get the level element weight. More...
 
StatusInt mdlLevel_getElementSymbology (UInt *elementColorOut, int *elementStyleOut, LineStyleParamsP elementStyleParamsOut, UInt *elementWeightOut, DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn)
 Get the element symbology. More...
 
StatusInt mdlLevel_getElementAccess (DgnPlatform::LevelElementAccess *elementAccessOut, DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn)
 Get the element access mode. More...
 
bool mdlLevel_isElementLocked (DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn)
 Check if elements on the specified level are locked. More...
 
bool mdlLevel_isElementReadOnly (DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn)
 Check if elements on the specified level are read-only. More...
 
bool mdlLevel_isElementViewOnly (DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn)
 Check if elements on the specified level are view-only. More...
 
StatusInt mdlLevel_getDisplay (bool *levelDisplayOut, DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn)
 Get the display flag. More...
 
StatusInt mdlLevel_getPlot (bool *levelPlotOut, DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn)
 Get the plot flag. More...
 
StatusInt mdlLevel_getAttributesDifferFromSource (bool *levelDifferOut, BitMaskP differencesMaskOut, DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn)
 Get the 'level's attributes differ from source' flag. More...
 
bool mdlLevel_isExternal (DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn)
 Check if a level is an external (library) level or not. More...
 
StatusInt mdlLevel_getExternal (bool *levelExternalOut, DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn)
 Get the external flag. More...
 
StatusInt mdlLevel_getLibraryRef (LevelLibraryRefP *levelLibraryRefOut, DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn)
 For an external level, get its level-library. More...
 
StatusInt mdlLevel_getHidden (bool *levelHiddenOut, DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn)
 Get the hidden flag. More...
 
bool mdlLevel_isHidden (DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn)
 Check if a level is hidden. More...
 
StatusInt mdlLevel_getReadOnly (bool *levelReadOnlyOut, DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn)
 Get the read-only flag. More...
 
bool mdlLevel_isReadOnly (DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn)
 Check if a level is read-only. More...
 
StatusInt mdlLevel_getFrozen (bool *levelFrozenOut, DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn, LevelFrozenType frozenTypeIn)
 Get the frozen flag. More...
 
bool mdlLevel_isFrozen (DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn, LevelFrozenType frozenTypeIn)
 Check if a level is frozen. More...
 
StatusInt mdlLevel_getUniqueID (DgnPlatform::ElementId *uniqueIDOut, DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn)
 Get the level element's unique ID. More...
 
StatusInt mdlLevel_getIdFromName (DgnPlatform::LevelId *levelIdOut, DgnModelRefP modelRefIn, DgnPlatform::LevelId, WCharCP levelNameIn)
 Given a level-name, get its level-id. More...
 
StatusInt mdlLevel_getIdFromNameIncludingLibraries (DgnPlatform::LevelId *levelIdOut, DgnModelRefP modelRefIn, WCharCP levelNameIn)
 Given a level-name, get its level-id, including levels that are in level libraries. More...
 
StatusInt mdlLevel_getIdFromCode (DgnPlatform::LevelId *levelIdOut, DgnModelRefP modelRefIn, DgnPlatform::LevelCode levelCodeIn)
 Given a level-code, get its level-id. More...
 
StatusInt mdlLevel_getIdFromCodeIncludingLibraries (DgnPlatform::LevelId *levelIdOut, DgnModelRefP modelRefIn, DgnPlatform::LevelCode levelCodeIn)
 Given a level-code, get its level-id, including levels that are in level libraries. More...
 
bool mdlLevel_isUsed (DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn, bool inFile)
 Check if a level is used. More...
 
StatusInt mdlLevel_getUsage (bool *usageOut, DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn, bool inFile)
 Get the level usage flag. More...
 
StatusInt mdlLevel_reportUsage (WStringR reportStringOut, DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn)
 Generate a report that describes where a level is used in the context of the file of specified model-ref. More...
 
StatusInt mdlLevel_getElementCount (int *usageCountOut, DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn)
 Get the the number of elements of specified model-ref that use specified level. More...
 
StatusInt mdlLevel_getDisplayPriority (Int32 *priorityOut, DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn)
 Get level display priority. More...
 
StatusInt mdlLevel_getTransparency (double *transparencyOut, DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn)
 Get level display transparency. More...
 
StatusInt mdlLevel_create (DgnPlatform::LevelId *levelIdOut, DgnModelRefP modelRefIn, WCharCP levelNameIn, DgnPlatform::LevelCode levelCodeIn)
 Create a new level. More...
 
StatusInt mdlLevel_createFromSeed (DgnPlatform::LevelId *levelIdOut, DgnModelRefP modelRefIn, const WChar *levelNameIn, DgnPlatform::LevelCode levelCodeIn, DgnPlatform::LevelId seedLevelIdIn, BitMaskCP copyAttributeMaskIn)
 Create a new level. More...
 
StatusInt mdlLevel_delete (DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn)
 Delete a level. More...
 
StatusInt mdlLevel_setName (DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn, WCharCP nameIn)
 Set level name. More...
 
StatusInt mdlLevel_setCode (DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn, DgnPlatform::LevelCode levelCodeIn)
 Set level code. More...
 
StatusInt mdlLevel_setDescription (DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn, WCharCP descriptionIn)
 Set level description. More...
 
StatusInt mdlLevel_setColor (DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn, UInt *colorIn, bool *colorOverrideIn)
 Set level color. More...
 
StatusInt mdlLevel_setMaterialId (DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn, DgnPlatform::ElementId *materialIdIn, bool *materialOverrideIn)
 Set level material id. More...
 
StatusInt mdlLevel_setStyle (DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn, int *styleIn, LineStyleParamsP styleParamsIn, bool *styleOverrideIn)
 Set level style. More...
 
StatusInt mdlLevel_setWeight (DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn, UInt *weightIn, bool *weightOverrideIn)
 Set level weight. More...
 
StatusInt mdlLevel_setSymbology (DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn, UInt *colorIn, bool *colorOverrideIn, int *styleIn, LineStyleParamsP styleParamsIn, bool *styleOverrideIn, UInt *weightIn, bool *weightOverrideIn)
 Set level symbology. More...
 
StatusInt mdlLevel_setElementColor (DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn, UInt colorIn)
 Set element color. More...
 
StatusInt mdlLevel_setElementMaterialId (DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn, DgnPlatform::ElementId materialIdIn)
 Set level element material id. More...
 
StatusInt mdlLevel_setElementStyle (DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn, int *styleIn, LineStyleParamsP styleParamsIn)
 Set element style. More...
 
StatusInt mdlLevel_setElementWeight (DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn, UInt weightIn)
 Set element weight. More...
 
StatusInt mdlLevel_setElementSymbology (DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn, UInt *colorIn, int *styleIn, LineStyleParamsP styleParamsIn, UInt *weightIn)
 Set element symbology. More...
 
StatusInt mdlLevel_setElementAccess (DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn, DgnPlatform::LevelElementAccess elementAccessIn)
 Set the level's element access mode. More...
 
StatusInt mdlLevel_setDisplay (DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn, bool displayIn)
 Set level display on/off. More...
 
StatusInt mdlLevel_setFrozen (DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn, LevelFrozenType frozenTypeIn, bool frozenIn)
 Set level frozen on/off. More...
 
StatusInt mdlLevel_setPlot (DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn, bool plotIn)
 Set level plot on/off. More...
 
StatusInt mdlLevel_setHidden (DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn, bool hiddenIn)
 Set level hidden on/off. More...
 
StatusInt mdlLevel_setDisplayPriority (DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn, Int32 priorityIn)
 Set level display priority. More...
 
StatusInt mdlLevel_setTransparency (DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn, double transparencyIn)
 Set level display transparency. More...
 
StatusInt mdlLevel_setReadOnly (DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn, bool isReadOnlyIn)
 Set level read-only on/off. More...
 
bool mdlLevel_compareLevelData (BitMaskP compareAttributesOut, DgnModelRefP modelRef1In, DgnPlatform::LevelId levelId1In, DgnModelRefP modelRef2In, DgnPlatform::LevelId levelId2In, BitMaskCP compareAttributesIn)
 Compare level related data between level1 and level2. More...
 
StatusInt mdlLevel_copyLevelData (DgnModelRefP destModelRefIn, DgnPlatform::LevelId destLevelIdIn, DgnModelRefP sourceModelRefIn, DgnPlatform::LevelId sourceLevelIdIn)
 Copy all level related data from source level into destination level. More...
 
StatusInt mdlLevel_copyLevelDataByAttributeMask (DgnModelRefP destModelRefIn, DgnPlatform::LevelId destLevelIdIn, DgnModelRefP sourceModelRefIn, DgnPlatform::LevelId sourceLevelIdIn, BitMaskCP copyAttributesMaskIn)
 Copy level related data as specified by the level-attributes mask from source level into destination level. More...
 
StatusInt mdlLevel_copyLevel (DgnPlatform::LevelId *levelIdOut, DgnModelRefP destModelRefIn, DgnModelRefP sourceModelRefIn, DgnPlatform::LevelId sourceLevelIdIn, bool setExternalIn)
 Copy a level from source model into destination model. More...
 
StatusInt mdlLevel_draw (bool *viewDrawIn, bool incrementalIn, DgnPlatform::DgnDrawMode drawModeIn, DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn, bool startEndMsgIn, bool drawSharedIn)
 Draw all elements on specified level. More...
 
StatusInt mdlLevel_selectElement (int *numElementSelectedOut, DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn)
 Select elements on specified level. More...
 
StatusInt mdlLevel_deleteElement (int *numElementDeletedOut, DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn, bool inEntireFileIn, bool updateViewIn)
 Delete elements on specified level. More...
 
StatusInt mdlLevel_copyElement (int *numElementCopiedOut, DgnModelRefP destModelRefIn, DgnPlatform::LevelId destLevelIdIn, DgnModelRefP sourceModelRefIn, DgnPlatform::LevelId sourceLevelIdIn, bool inEntireFileIn)
 Copy elements in source level to destination level. More...
 
StatusInt mdlLevel_moveElementLevel (int *numElementMovedOut, DgnPlatform::LevelId destLevelIdIn, DgnModelRefP modelRefIn, DgnPlatform::LevelId sourceLevelIdIn, bool inEntireFileIn)
 Move elements of source level to destination level. More...
 
StatusInt mdlLevel_setElementByLevel (int *numElementChangedOut, DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn, BitMaskP elementAttributeStringIn, bool inEntireFileIn, bool isSetByLevel)
 set or unset elements symbology to that of BYLEVEL. More...
 
DgnPlatform::LevelId mdlLevel_getSeedLevel (DgnModelRefP modelRefIn)
 Get level-id of seed level. More...
 
BitMaskCP mdlLevelAttribute_getMask (LevelAttributeMaskType attributeTypeIn)
 Return the level-attribute bit-mask for a given attribute list type. More...
 
bool mdlLevelName_hasValidCharacters (WCharCP nameStringIn)
 Check if specified Name String is valid. More...
 
void mdlLevelName_replaceInvalidCharacters (WChar *nameStringIn, WChar replacementCharIn)
 
Replace all invalid characters in specified Name String with another

character More...

 
LevelIteratorR mdlLevelIterator_create (DgnModelRefP modelRefIn)
 Create a new level iterator. More...
 
void mdlLevelIterator_free (LevelIteratorR levelIteratorIn)
 Free a level iterator which is not required. More...
 
StatusInt mdlLevelIterator_setLevelFilter (LevelIteratorR levelIteratorIn, DgnModelRefP modelRefIn, FilterID filterIdIn)
 Set a level filter through which iterated levels should pass through. More...
 
StatusInt mdlLevelIterator_setIterateType (LevelIteratorR levelIteratorIn, LevelIterateType iterateTypeIn)
 Set iteration type. More...
 
StatusInt mdlLevelIterator_setIterateLibraryLevels (LevelIteratorR levelIteratorIn, bool iterateLibraryLevelsIn)
 Set if library-levels of the iterator's model-ref should be iterated or not. More...
 
DgnPlatform::LevelId mdlLevelIterator_getNext (LevelIteratorR levelIteratorIn)
 Get next level. More...
 
DgnPlatform::LevelId mdlLevelIterator_getFirst (LevelIteratorR levelIteratorIn)
 Get first level. More...
 
StatusInt mdlLevelIterator_traverse (LevelIteratorR levelIteratorIn, LevelIteratorTraverseCallback userFunctionIn, CallbackArgP userArgIn)
 Traverse through all level entries as specified in the iterator. More...
 
bool mdlLevelEnv_allowEditingOfNestedAttachmentLevels ()
 Check if editing of nested attachment levels is allowed. More...
 
StatusInt mdlLevelError_getMessage (WStringR errorMessageOut, int errorStatusIn)
 Get a message string describing a returned level-error status. More...
 
int mdlLevelError_outputToMessageCenter (DgnPlatform::OutputMessagePriority errorMessagePriorityIn, int errorStatusIn)
 Output to the message center a message string describing a returned level-error status. More...
 

Detailed Description

Typedef Documentation

typedef StatusInt(* LevelIteratorTraverseCallback)(DgnPlatform::LevelHandle levelIdHandle, CallbackArgP userArgIn)

UserFunction called when traversing levels.

Parameters
[in]levelIdInlevel-id of level being traversed.
[in]userArgInuser argument that was specified in the mdlLevelIterator_traverse function.
See also
mdlIterator_traverse

Function Documentation

bool mdlLevel_compareLevelData ( BitMaskP  compareAttributesOut,
DgnModelRefP  modelRef1In,
DgnPlatform::LevelId  levelId1In,
DgnModelRefP  modelRef2In,
DgnPlatform::LevelId  levelId2In,
BitMaskCP  compareAttributesIn 
)

Compare level related data between level1 and level2.

The function will compare only those attributes as specified in pCompareAttributesMaskIn. If pCompareAttributesMaskIn is NULL, then all the attributes will be compared.

Parameters
[out]compareAttributesOutif non-null, then return a set of bits that represent the attributes of the levels that are not the same.
[in]modelRef1Inmodel 1
[in]levelId1Inlevel id of model 1
[in]modelRef2Inmodel 2
[in]levelId2Inlevel id of model 2
[in]compareAttributesInmask of attributes to compare
Returns
true if the level data of the two levels matches for attributes specified in pCompareAttributesMaskIn
StatusInt mdlLevel_copyElement ( int *  numElementCopiedOut,
DgnModelRefP  destModelRefIn,
DgnPlatform::LevelId  destLevelIdIn,
DgnModelRefP  sourceModelRefIn,
DgnPlatform::LevelId  sourceLevelIdIn,
bool  inEntireFileIn 
)

Copy elements in source level to destination level.

Parameters
[out]numElementCopiedOutnumber of elements copied
[in]destModelRefIndestination model to copy elements to
[in]destLevelIdIndestination level to copy elements to
[in]sourceModelRefInsource model ref whose elements to copy
[in]sourceLevelIdInsource level from which to copy elements from
[in]inEntireFileInif true, then move elements in entire file of sourceModelRefIn, else copy elements only in the specified model
Returns
ERROR if the model-ref or the level ids are invalid, else SUCCESS
StatusInt mdlLevel_copyLevel ( DgnPlatform::LevelId *  levelIdOut,
DgnModelRefP  destModelRefIn,
DgnModelRefP  sourceModelRefIn,
DgnPlatform::LevelId  sourceLevelIdIn,
bool  setExternalIn 
)

Copy a level from source model into destination model.

Creates a new level in the destination model with the same level-name & level-code as the source level.

Parameters
[out]levelIdOutid of new level in pDestModelRefIn
[in]destModelRefIndestination model-ref to copy into
[in]sourceModelRefInsource model ref
[in]sourceLevelIdInid of library level to copy
[in]setExternalInif true, then set the imported level as "external". Should be true only if pSourceModelRef is LEVEL_LIBRARY_MODELREF.
Returns
SUCCESS if the level data is successfully copied.
Remarks
Possible return failure codes are:
MSGID_errorTableIsReadOnly
the level-table of the destination model-ref is in a read-only state
MSGID_errorTableIsOfAttachment
the destination model-ref is for an attachment
ERROR
if model-ref or level id is invalid or the copy failed for some unspecified reason
A successful level copy set raises a LEVEL_CHANGE_ATTRIBUTE event.
Call mdlLevelTable_rewrite to save the updated level-table.
See also
mdlLevelTable_rewrite
StatusInt mdlLevel_copyLevelData ( DgnModelRefP  destModelRefIn,
DgnPlatform::LevelId  destLevelIdIn,
DgnModelRefP  sourceModelRefIn,
DgnPlatform::LevelId  sourceLevelIdIn 
)

Copy all level related data from source level into destination level.

This function does not copy the level-name & level-code.

Parameters
[in]destModelRefIndestination model
[in]destLevelIdIndestination level id
[in]sourceModelRefInsource model
[in]sourceLevelIdInsource level id
Returns
SUCCESS if the level data is successfully copied.
Remarks
Possible return failure codes are:
MSGID_errorTableIsReadOnly
the level-table of the destination model-ref is in a read-only state
MSGID_errorLevelIsReadOnly
the specified destination level is in a read-only state
ERROR
if source/destination model-ref or level id is invalid or the copy failed for some unspecified reason
A successful level copy raises a LEVEL_CHANGE_ATTRIBUTE event.
Call mdlLevelTable_rewrite to save the updated level-table.
See also
mdlLevelTable_rewrite
StatusInt mdlLevel_copyLevelDataByAttributeMask ( DgnModelRefP  destModelRefIn,
DgnPlatform::LevelId  destLevelIdIn,
DgnModelRefP  sourceModelRefIn,
DgnPlatform::LevelId  sourceLevelIdIn,
BitMaskCP  copyAttributesMaskIn 
)

Copy level related data as specified by the level-attributes mask from source level into destination level.

This function does not copy the level-name & level-code.

Parameters
[in]destModelRefIndestination model
[in]destLevelIdIndestination level id
[in]sourceModelRefInsource model
[in]sourceLevelIdInsource level id
[in]copyAttributesMaskInmask of attributes to copy - will never copy level name
Returns
SUCCESS if the level data is successfully copied.
Remarks
Possible return failure codes are:
MSGID_errorTableIsReadOnly
the level-table of the destination model-ref is in a read-only state
MSGID_errorLevelIsReadOnly
the specified destination level is in a read-only state
ERROR
if source/destination model-ref or level id is invalid or the copy failed for some unspecified reason
A successful level copy raises a LEVEL_CHANGE_ATTRIBUTE event.
Call mdlLevelTable_rewrite to save the updated level-table.
See also
mdlLevelTable_rewrite
StatusInt mdlLevel_create ( DgnPlatform::LevelId *  levelIdOut,
DgnModelRefP  modelRefIn,
WCharCP  levelNameIn,
DgnPlatform::LevelCode  levelCodeIn 
)

Create a new level.

Remarks
A new level can be created only in the context of the current file (i.e. specified model-ref should be a root-model of the current file).
The specified level-name should be unique in the context of the all other root levels of the level-table. Otherwise the level is not created.
The specified level-code should be unique in the context of the entire level-table. Otherwise the level is not created. LEVEL_NULL_CODE can be specified for the level-code, in which case, mdlLevel_create will automatically generate a unique level-code and assign it to the new level. Such a level-code will be termed as a "system-assigned" level-code.
Parameters
[out]levelIdOutlevel id of new level
[in]modelRefInmodel-ref of level-table
[in]levelNameInlevel name of new level
[in]levelCodeInlevel code of new level - maybe LEVEL_NULL_CODE.
Returns
SUCCESS if level is successfully created.
Remarks
Possible return failure codes are:
MSGID_errorTableIsReadOnly
the level-table is in a read-only state
MSGID_errorCannotCreateNewAttachmentLevel
the specified model-ref is for an attachment
MSGID_errorLevelNameIsDuplicate
the specified level-name is duplicate
MSGID_errorLevelCodeIsDuplicate
the specified level-code is duplicate
ERROR
if the model-ref is invalid or the new level cannot be created for some unspecified reason
A successful level create raises a LEVEL_CREATE event.
Call mdlLevelTable_rewrite to save the updated level-table
See also
mdlLevel_delete mdlLevelTable_rewrite
mdlLevelTable_rewrite
StatusInt mdlLevel_createFromSeed ( DgnPlatform::LevelId *  levelIdOut,
DgnModelRefP  modelRefIn,
const WChar *  levelNameIn,
DgnPlatform::LevelCode  levelCodeIn,
DgnPlatform::LevelId  seedLevelIdIn,
BitMaskCP  copyAttributeMaskIn 
)

Create a new level.

The new level takes its attributes as specified "copyAttributeMaskIn" from the "seed" level. Typically, "copyAttributeMaskIn" is got by calling function mdlLevelAttribute_getMask (MS_LEVEL_CREATE_FROM_SEED_ATTRIBUTE_MASK)

Parameters
[out]levelIdOutlevel id of new level
[in]modelRefInmodel-ref of level-table
[in]levelNameInlevel name of new level
[in]levelCodeInlevel code of new level - maybe LEVEL_NULL_CODE.
[in]seedLevelIdInseed level
[in]copyAttributeMaskInseed level
Returns
SUCCESS if level is successfully created.
Remarks
A successful level create raises a LEVEL_CREATE event.
Call mdlLevelTable_rewrite to save the updated level-table
See also
mdlLevel_create usmtnmdlLevel_getSeedLevelC mdlLevelTable_rewrite
mdlLevelTable_rewrite
StatusInt mdlLevel_delete ( DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn 
)

Delete a level.

Remarks
A level can be deleted only in the context of the current file (i.e. modelRefIn should be a root-model of the current file).
Parameters
[in]modelRefInmodel-ref of level-table
[in]levelIdInlevel id to delete
Returns
SUCCESS if the level is successfully deleted.
Remarks
Possible return failure codes are:
MSGID_errorTableIsReadOnly
the level-table is in a read-only state
MSGID_errorCannotDeleteAttachmentLevel
the specified model-ref is for an attachment
MSGID_errorLevelIsReadOnly
the specified level is in a read-only state
MSGID_errorLevelIsUsed
the specified level is used by some element in the file
MSGID_errorCannotDeleteExternalLevel
the specified level is a library level
MSGID_errorCannotDeleteDefaultLevel
the specified level is the default level
MSGID_errorCannotDeleteDefpointsLevel
the specified level is the DWG DEFPOINTS level
ERROR
if model-ref or level-id is invalid or the level cannot be deleted for some unspecified reason
A successful level delete raises a LEVEL_DELETE event.
Call mdlLevelTable_rewrite to save the updated level-table
See also
mdlLevel_create mdlLevelTable_rewrite
mdlLevelTable_rewrite
StatusInt mdlLevel_deleteElement ( int *  numElementDeletedOut,
DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn,
bool  inEntireFileIn,
bool  updateViewIn 
)

Delete elements on specified level.

Parameters
[out]numElementDeletedOutnumber of elements deleted
[in]modelRefInsource model ref whose elements to delete
[in]levelIdInsource level from which to delete elements
[in]inEntireFileInif true, then delete elements in entire file that contains modelRefIn, else delete elements only in the specified model
[in]updateViewInif true, then update the views
Returns
ERROR if the model-ref or the level ids are invalid, else SUCCESS
StatusInt mdlLevel_draw ( bool *  viewDrawIn,
bool  incrementalIn,
DgnPlatform::DgnDrawMode  drawModeIn,
DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn,
bool  startEndMsgIn,
bool  drawSharedIn 
)

Draw all elements on specified level.

Parameters
[in]viewDrawInviews to update. Should point to an array dimensioned to DgnPlatform::MAX_VIEWS, and viewDraw[i] controls whether view i is drawn. If NULL, all views are drawn.
[in]incrementalInif false, don't erase before drawing
[in]drawModeInerasing portion of drawing
[in]modelRefInmodel ref
[in]levelIdInlevel to draw
[in]startEndMsgInif true then want in prog/complete msg
[in]drawSharedInif true, then draw all models/attachments which use the same level
Returns
ERROR if the model-ref or level id is invalid, else SUCCESS
See also
mdlLevel_draw
StatusInt mdlLevel_getActive ( DgnPlatform::LevelId *  levelIdOut)

Get the current active level.

Parameters
[out]levelIdOutactive level id
Returns
SUCCESS
See also
mdlLevel_isActive mdlLevel_setActive mdlLevel_setActiveByName mdlParams_setActive
StatusInt mdlLevel_getAttributesDifferFromSource ( bool *  levelDifferOut,
BitMaskP  differencesMaskOut,
DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn 
)

Get the 'level's attributes differ from source' flag.

Parameters
[out]levelDifferOuttrue if the level differs from its source
[out]differencesMaskOutlist of attributes which differ.
[in]modelRefInmodel-ref of level-table
[in]levelIdInlevel id
Returns
ERROR if the model-ref or level id is invalid, else SUCCESS
StatusInt mdlLevel_getCode ( DgnPlatform::LevelCode *  levelCodeOut,
DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn 
)

Get level code.

Parameters
[out]levelCodeOutlevel code
[in]modelRefInmodel-ref of level-table
[in]levelIdInlevel id
Returns
ERROR if the model-ref or level id is invalid, else SUCCESS
See also
mdlLevel_setCode
StatusInt mdlLevel_getColor ( UInt colorOut,
bool *  colorOverrideOut,
DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn 
)

Get level color and color-override flag.

An element is displayed with this color in a view when the color-override flag is true and when level-symbology for the view is turned ON.

Parameters
[out]colorOutlevel color
[out]colorOverrideOutlevel color override - true or false
[in]modelRefInmodel-ref of level-table
[in]levelIdInlevel id
Returns
ERROR if the model-ref or level id is invalid, else SUCCESS
See also
mdlLevel_setColor mdlLevel_getSymbology mdlLevel_setSymbology
mdlLevel_getSymbology mdlLevel_setSymbology
StatusInt mdlLevel_getCreateTimeStamp ( UInt createTimeStampOut,
DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn 
)

Get level create time stamp.

Parameters
[out]createTimeStampOutlevel create time stamp
[in]modelRefInmodel-ref of level-table
[in]levelIdInlevel id
Returns
ERROR if the model-ref or level id is invalid, else SUCCESS
See also
mdlLevel_setDescription
StatusInt mdlLevel_getDescription ( WChar *  descriptionOut,
int  stringSizeIn,
DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn 
)

Get level description.

Parameters
[out]descriptionOutlevel description
[in]stringSizeInnumber of characters pLevelDescriptionOut can hold
[in]modelRefInmodel-ref of level-table
[in]levelIdInlevel id
Returns
ERROR if the model-ref or level id is invalid, else SUCCESS
See also
mdlLevel_setDescription
StatusInt mdlLevel_getDisplay ( bool *  levelDisplayOut,
DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn 
)

Get the display flag.

Parameters
[out]levelDisplayOutlevel display flag - true or false
[in]modelRefInmodel-ref of level-table
[in]levelIdInlevel id
Returns
ERROR if the model-ref or level id is invalid, else SUCCESS
See also
mdlLevel_setDisplayMask mdlLevel_getDisplayMask mdlLevel_setDisplay
StatusInt mdlLevel_getDisplayPriority ( Int32 priorityOut,
DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn 
)

Get level display priority.

Parameters
[out]priorityOutlevel display priority
[in]modelRefInmodel-ref of level-table
[in]levelIdInlevel id
Returns
ERROR if the model-ref or level id is invalid, else SUCCESS
See also
mdlLevel_setDisplayPriority
StatusInt mdlLevel_getElementAccess ( DgnPlatform::LevelElementAccess *  elementAccessOut,
DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn 
)

Get the element access mode.

Parameters
[out]elementAccessOutelement access - one of LEVEL_ELEMENT_ACCESS_... (defined in leveltypes.h)
[in]modelRefInmodel-ref of level-table
[in]levelIdInlevel id
Returns
ERROR if the model-ref or level id is invalid, else SUCCESS
See also
mdlLevel_setElementAccess mdlLevel_isElementLocked mdlLevel_isElementReadOnly mdlLevel_isElementViewOnly
StatusInt mdlLevel_getElementColor ( UInt colorOut,
DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn 
)

Get the level element color.

This color value is applied on an element when the element's color is set to BYLEVEL.

Parameters
[out]colorOutelement color
[in]modelRefInmodel-ref of level-table
[in]levelIdInlevel id
Returns
ERROR if the model-ref or level id is invalid, else SUCCESS
See also
mdlLevel_setElementColor mdlLevel_getElementSymbology mdlLevel_setElementSymbology
mdlLevel_getElementSymbology mdlLevel_setElementSymbology
StatusInt mdlLevel_getElementCount ( int *  usageCountOut,
DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn 
)

Get the the number of elements of specified model-ref that use specified level.

Parameters
[out]usageCountOutnumber of elements that use the level
[in]modelRefInmodel-ref of level-table
[in]levelIdInlevel id
Returns
ERROR if the model-ref or level id is invalid, else SUCCESS
See also
mdlLevel_getUsageMask mdlLevel_isUsed mdlLevel_getUsage mdlLevel_reportUsage
StatusInt mdlLevel_getElementMaterialId ( DgnPlatform::ElementId *  materialIdOut,
DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn 
)

Get level element material id associated with the level.

Parameters
[out]materialIdOutelement material id
[in]modelRefInmodel-ref of level-table
[in]levelIdInlevel id
Returns
ERROR if the model-ref or level id is invalid, else SUCCESS
See also
mdlLevel_setElementMaterialId
StatusInt mdlLevel_getElementStyle ( int *  styleOut,
LineStyleParamsP  styleParamsOut,
DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn 
)

Get the level element style and custom-line style override info.

This style value is applied on an element when the element's style is set to BYLEVEL.

Parameters
[out]styleOutelement style
[out]styleParamsOutcustom line style modifiers
[in]modelRefInmodel-ref of level-table
[in]levelIdInlevel id
Returns
ERROR if the model-ref or level id is invalid, else SUCCESS
See also
mdlLevel_setElementStyle mdlLevel_getElementSymbology mdlLevel_setElementSymbology
mdlLevel_getElementSymbology mdlLevel_setElementSymbology
StatusInt mdlLevel_getElementSymbology ( UInt elementColorOut,
int *  elementStyleOut,
LineStyleParamsP  elementStyleParamsOut,
UInt elementWeightOut,
DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn 
)

Get the element symbology.

Parameters
[out]elementColorOutelement color
[out]elementStyleOutelement style
[out]elementStyleParamsOutcustom line style modifiers
[out]elementWeightOutelement weight
[in]modelRefInmodel-ref of level-table
[in]levelIdInlevel id
Returns
ERROR if the model-ref or level id is invalid, else SUCCESS
See also
mdlLevel_setElementSymbology
StatusInt mdlLevel_getElementWeight ( UInt weightOut,
DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn 
)

Get the level element weight.

This weight value is applied on an element when the the element's weight is set to BYLEVEL.

Parameters
[out]weightOutelement weight
[in]modelRefInmodel-ref of level-table
[in]levelIdInlevel id
Returns
ERROR if the model-ref or level id is invalid, else SUCCESS
See also
mdlLevel_setElementWeight mdlLevel_getElementSymbology mdlLevel_setElementSymbology
mdlLevel_getElementSymbology mdlLevel_setElementSymbology
StatusInt mdlLevel_getExternal ( bool *  levelExternalOut,
DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn 
)

Get the external flag.

Parameters
[out]levelExternalOutlevel external flag
[in]modelRefInmodel-ref of level-table
[in]levelIdInlevel id
Returns
ERROR if the model-ref or level id is invalid, else SUCCESS
See also
mdlLevelTable_getExternalMask mdlLevel_isExternal mdlLevel_getLibraryRef
StatusInt mdlLevel_getFrozen ( bool *  levelFrozenOut,
DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn,
LevelFrozenType  frozenTypeIn 
)

Get the frozen flag.

Parameters
[out]levelFrozenOutlevel frozen flag
[in]modelRefInmodel-ref of level-table
[in]levelIdInlevel id
[in]frozenTypeInone of LEVEL_FROZEN_TYPE_... (defined in leveltable.h)
Returns
ERROR if the model-ref or level id is invalid, else SUCCESS
See also
mdlLevelTable_getFrozenMask mdlLevelTable_setFrozenMask mdlLevelTable_getDisplayFrozenMask mdlLevel_isFrozen mdlLevel_setFrozen
StatusInt mdlLevel_getHidden ( bool *  levelHiddenOut,
DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn 
)

Get the hidden flag.

Parameters
[out]levelHiddenOutlevel hidden flag
[in]modelRefInmodel-ref of level-table
[in]levelIdInlevel id
Returns
ERROR if the model-ref or level id is invalid, else SUCCESS
See also
mdlLevelTable_getHiddenMask mdlLevel_isHidden mdlLevel_setHidden
StatusInt mdlLevel_getIdFromCode ( DgnPlatform::LevelId *  levelIdOut,
DgnModelRefP  modelRefIn,
DgnPlatform::LevelCode  levelCodeIn 
)

Given a level-code, get its level-id.

Parameters
[out]levelIdOutlevel id
[in]modelRefInmodel-ref of level-table
[in]levelCodeInlevel code
Returns
SUCCESS if the level-id is successfully returned.
Remarks
This function does not look in level libraries.
See also
mdlLevel_getIdFromCodeIncludingLibraries
Remarks
Possible return failure codes are:
MSGID_errorLevelCodeIsInvalid
the level-code is not valid
ERROR
if the model-ref is invalid or the level cannot be returned for some unspecified reason
See also
mdlLevel_getIdFromName mdlLevel_getIdFromElementId mdlLevel_getIdFromElementRef
StatusInt mdlLevel_getIdFromCodeIncludingLibraries ( DgnPlatform::LevelId *  levelIdOut,
DgnModelRefP  modelRefIn,
DgnPlatform::LevelCode  levelCodeIn 
)

Given a level-code, get its level-id, including levels that are in level libraries.

Parameters
[out]levelIdOutlevel id
[in]modelRefInmodel-ref of level-table
[in]levelCodeInlevel code
Returns
SUCCESS if the level-id is successfully returned.
See also
mdlLevel_getIdFromCode
Remarks
Possible return failure codes are:
MSGID_errorLevelCodeIsInvalid
the level-code is not valid
ERROR
if the model-ref is invalid or the level cannot be returned for some unspecified reason
See also
mdlLevel_getIdFromName mdlLevel_getIdFromElementId mdlLevel_getIdFromElementRef
StatusInt mdlLevel_getIdFromName ( DgnPlatform::LevelId *  levelIdOut,
DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  ,
WCharCP  levelNameIn 
)

Given a level-name, get its level-id.

Parameters
[out]levelIdOutlevel id
[in]modelRefInmodel-ref of level-table
[in]levelNameInlevel name
Returns
SUCCESS if the level-id is successfully returned.
Remarks
This function does not look in level libraries.
See also
mdlLevel_getIdFromNameIncludingLibraries
Remarks
Possible return failure codes are:
MSGID_errorLevelNameIsInvalid
the level-name is not valid
ERROR
if the model-ref is invalid or the level cannot be returned for some unspecified reason
See also
mdlLevel_getIdFromCode mdlLevel_getIdFromElementId mdlLevel_getIdFromElementRef
StatusInt mdlLevel_getIdFromNameIncludingLibraries ( DgnPlatform::LevelId *  levelIdOut,
DgnModelRefP  modelRefIn,
WCharCP  levelNameIn 
)

Given a level-name, get its level-id, including levels that are in level libraries.

Parameters
[out]levelIdOutlevel id
[in]modelRefInmodel-ref of level-table
[in]levelNameInlevel name
Returns
SUCCESS if the level-id is successfully returned.
See also
mdlLevel_getIdFromName
Remarks
Possible return failure codes are:
MSGID_errorLevelNameIsInvalid
the level-name is not valid
ERROR
if the model-ref is invalid or the level cannot be returned for some unspecified reason
See also
mdlLevel_getIdFromCode mdlLevel_getIdFromElementId mdlLevel_getIdFromElementRef
StatusInt mdlLevel_getLibraryRef ( LevelLibraryRefP *  levelLibraryRefOut,
DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn 
)

For an external level, get its level-library.

Parameters
[out]levelLibraryRefOutlevel library reference. NULL if the level is not an external level.
[in]modelRefInmodel-ref of level-table
[in]levelIdInlevel id
Returns
ERROR if the model-ref or level id is invalid, else SUCCESS
See also
mdlLevelTable_getExternalMask mdlLevel_getExternal mdlLevel_isExternal
StatusInt mdlLevel_getMaterialId ( DgnPlatform::ElementId *  materialIdOut,
bool *  materialOverrideOut,
DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn 
)

Get material id associated with the level.

Parameters
[out]materialIdOutlevel material id
[out]materialOverrideOutlevel material override
[in]modelRefInmodel-ref of level-table
[in]levelIdInlevel id
Returns
ERROR if the model-ref or level id is invalid, else SUCCESS
See also
mdlLevel_setMaterialId
StatusInt mdlLevel_getName ( WChar *  levelNameOut,
int  stringSizeIn,
DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn 
)

Get level name.

Parameters
[out]levelNameOutlevel name
[in]stringSizeInnumber of (WChar) characters pLevelNameOut can hold
[in]modelRefInmodel-ref of level-table
[in]levelIdInlevel id
Returns
ERROR if the model-ref or level id is invalid, else SUCCESS
See also
mdlLevel_setName mdlLevel_getPathName
StatusInt mdlLevel_getPlot ( bool *  levelPlotOut,
DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn 
)

Get the plot flag.

Parameters
[out]levelPlotOutlevel plot flag
[in]modelRefInmodel-ref of level-table
[in]levelIdInlevel id
Returns
ERROR if the model-ref or level id is invalid, else SUCCESS
See also
mdlLevelTable_getPlotMask mdlLevel_setPlot
StatusInt mdlLevel_getReadOnly ( bool *  levelReadOnlyOut,
DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn 
)

Get the read-only flag.

Parameters
[out]levelReadOnlyOutlevel read-only flag
[in]modelRefInmodel-ref of level-table
[in]levelIdInlevel id
Returns
ERROR if the model-ref or level id is invalid, else SUCCESS
See also
mdlLevelTable_getReadOnlyMask mdlLevel_isReadOnly mdlLevel_setReadOnly
DgnPlatform::LevelId mdlLevel_getSeedLevel ( DgnModelRefP  modelRefIn)

Get level-id of seed level.

When a new level is created, then the user designated seed level whose attributes need to be applied on the newly created level.

Remarks
mdlLevel_createLevel does not apply the attributes of the seed level. mdlLevel_createLevel will only create a newly allocated level. The attributes of the seed level can then be applied using mdlLevel_copyLevelData. To create a level & apply the seed in one step, call the function mdlLevel_createFromSeed
Parameters
[in]modelRefInmodel ref
Returns
DgnPlatform::LevelId of seed level
StatusInt mdlLevel_getStyle ( int *  styleOut,
LineStyleParamsP  styleParamsOut,
bool *  styleOverrideOut,
DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn 
)

Get the level style, custom-line style override info and style-override flag.

An element is displayed with this style in a view when the style-override flag is true and when level-symbology for the view is turned ON.

Parameters
[out]styleOutlevel style
[out]styleParamsOutcustom line style modifiers
[out]styleOverrideOutlevel style override - true or false
[in]modelRefInmodel-ref of level-table
[in]levelIdInlevel id
Returns
ERROR if the model-ref or level id is invalid, else SUCCESS
See also
mdlLevel_setStyle mdlLevel_getSymbology mdlLevel_setSymbology
mdlLevel_getSymbology mdlLevel_setSymbology
StatusInt mdlLevel_getSymbology ( UInt colorOut,
bool *  colorOverrideOut,
int *  styleOut,
LineStyleParamsP  styleParamsOut,
bool *  styleOverrideOut,
UInt weightOut,
bool *  weightOverrideOut,
DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn 
)

Get the level symbology and symbology-override flags.

Parameters
[out]colorOutcolor
[out]colorOverrideOutcolor override - true or false
[out]styleOutstyle
[out]styleParamsOutcustom line style modifiers
[out]styleOverrideOutstyle override - true or false
[out]weightOutweight
[out]weightOverrideOutweight override - true or false
[in]modelRefInmodel-ref of level-table
[in]levelIdInlevel id
Returns
ERROR if the model-ref or level id is invalid, else SUCCESS
See also
mdlLevel_setSymbology
StatusInt mdlLevel_getTransparency ( double *  transparencyOut,
DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn 
)

Get level display transparency.

Parameters
[out]transparencyOutlevel display transparency (value between 0.0 & 1.0)
[in]modelRefInmodel-ref of level-table
[in]levelIdInlevel id
Returns
ERROR if the model-ref or level id is invalid, else SUCCESS
See also
mdlLevel_setTransparency
StatusInt mdlLevel_getUniqueID ( DgnPlatform::ElementId *  uniqueIDOut,
DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn 
)

Get the level element's unique ID.

The level element's unique id is assigned by the system and cannot be modified. This unique ID should not be confused with the level id returned by mdlLevel_getIdFromName (or mdlLevel_getIdFromCode or mdlLevelIterator_getFirst ..). The unique ID is an Int64 is stored at element->ehdr.uniqueId and is unique in the context of a file-object. The level-id is also system assigned, but is a UInt and is unique in the context of a level-table.

Parameters
[out]uniqueIDOutunique ID
[in]modelRefInmodel-ref of level-table
[in]levelIdInlevel id
Returns
ERROR if the model-ref or level id is invalid, else SUCCESS
StatusInt mdlLevel_getUsage ( bool *  usageOut,
DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn,
bool  inFile 
)

Get the level usage flag.

Parameters
[out]usageOutusage flag - true or false
[in]modelRefInmodel-ref of level-table
[in]levelIdInlevel id
[in]inFileif true, then check the level is used in the entire file
Returns
ERROR if the model-ref or level id is invalid, else SUCCESS
Remarks
  • If *pUsageOut is true, then the level is used.
  • If *pUsageOut is false, then the level is not used.
See also
mdlLevel_getUsageMask mdlLevel_isUsed mdlLevel_reportUsage mdlLevel_getElementCount
StatusInt mdlLevel_getWeight ( UInt weightOut,
bool *  weightOverrideOut,
DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn 
)

Get the level weight and weight-override flag.

An element is displayed with this style in a view when the weight-override flag is true and when level-symbology for the view is turned ON.

Parameters
[out]weightOutlevel weight
[out]weightOverrideOutlevel weight override - true or false
[in]modelRefInmodel-ref of level-table
[in]levelIdInlevel id
Returns
ERROR if the model-ref or level id is invalid, else SUCCESS
See also
mdlLevel_setWeight mdlLevel_getSymbology mdlLevel_setSymbology
mdlLevel_getSymbology mdlLevel_setSymbology
bool mdlLevel_isActive ( DgnPlatform::LevelId  levelIdIn)

Check if a level of the current-file is the active level.

Parameters
[in]levelIdInlevel id
Returns
true if iLevelIdIn is the active level, else false
See also
mdlLevel_getActive mdlLevel_setActive mdlLevel_setActiveByName mdlParams_setActive
StatusInt mdlLevel_isCodeAutoGenerated ( bool *  isAutoGeneratedOut,
DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn 
)

Get if the level code is auto generated (that means generated by MicroStation) or is manually set by the user.

Parameters
[out]isAutoGeneratedOuttrue if the level code is auto generated
[in]modelRefInmodel-ref of level-table
[in]levelIdInlevel id
Returns
ERROR if the model-ref or level id is invalid, else SUCCESS
See also
mdlLevel_setCode
bool mdlLevel_isElementLocked ( DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn 
)

Check if elements on the specified level are locked.

Parameters
[in]modelRefInmodel-ref of level-table
[in]levelIdInlevel id
Returns
true if the level's element-access is atleast locked, else false, else SUCCESS
See also
mdlLevel_setElementAccess mdlLevel_getElementAccess
bool mdlLevel_isElementReadOnly ( DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn 
)

Check if elements on the specified level are read-only.

Parameters
[in]modelRefInmodel-ref of level-table
[in]levelIdInlevel id
Returns
true if the level's element-access is atleast read-only, else false
See also
mdlLevel_setElementAccess mdlLevel_getElementAccess
bool mdlLevel_isElementViewOnly ( DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn 
)

Check if elements on the specified level are view-only.

Parameters
[in]modelRefInmodel-ref of level-table
[in]levelIdInlevel id
Returns
true if the level's element-access is view-only, else false
See also
mdlLevel_setElementAccess mdlLevel_getElementAccess
bool mdlLevel_isExternal ( DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn 
)

Check if a level is an external (library) level or not.

Parameters
[in]modelRefInmodel-ref of level-table
[in]levelIdInlevel id
Returns
true if the level is external, else false
See also
mdlLevelTable_getExternalMask mdlLevel_getExternal mdlLevel_getLibraryRef
bool mdlLevel_isFrozen ( DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn,
LevelFrozenType  frozenTypeIn 
)

Check if a level is frozen.

Parameters
[in]modelRefInmodel-ref of level-table
[in]levelIdInlevel id
[in]frozenTypeInone of LEVEL_FROZEN_TYPE_... (defined in leveltable.h)
Returns
true if the level is frozen, else false
See also
mdlLevelTable_getFrozenMask mdlLevelTable_setFrozenMask mdlLevelTable_getDisplayFrozenMask mdlLevel_getFrozen mdlLevel_setFrozen
bool mdlLevel_isHidden ( DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn 
)

Check if a level is hidden.

Parameters
[in]modelRefInmodel-ref of level-table
[in]levelIdInlevel id
Returns
true if the level is hidden, else false
See also
mdlLevelTable_getHiddenMask mdlLevel_getHidden mdlLevel_setHidden
bool mdlLevel_isReadOnly ( DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn 
)

Check if a level is read-only.

Parameters
[in]modelRefInmodel-ref of level-table
[in]levelIdInlevel id
Returns
true if the level is read-only, else false
See also
mdlLevelTable_getReadOnlyMask mdlLevel_getReadOnly mdlLevel_setReadOnly
bool mdlLevel_isUsed ( DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn,
bool  inFile 
)

Check if a level is used.

A level is used if there is an element on the level.

Parameters
[in]modelRefInmodel-ref of level-table
[in]levelIdInlevel id
[in]inFileif false, then check if a level is used in the context of modelRefIn only. if true, then returns if a level is used in the entire file of modelRefIn.
Returns
true if the level is used, else false
See also
mdlLevel_getUsageMask mdlLevel_getUsage mdlLevel_reportUsage mdlLevel_getElementCount
bool mdlLevel_isValid ( DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn 
)

Check if the specified level id is a valid existing level.

Parameters
[in]modelRefInmodel-ref of level-table
[in]levelIdInlevel id
Returns
true if the level is valid, else false. Returns false if modelRefIn is invalid.
See also
mdlLevel_isValidByName mdlLevel_isValidByCode
bool mdlLevel_isValidByCode ( DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn 
)

Check if level with specified code is a valid existing level.

Parameters
[in]modelRefInmodel-ref of level-table
[in]levelIdInlevel code
Returns
true if the level is valid, else false. Returns false if modelRefIn is invalid.
See also
mdlLevel_isValid mdlLevel_isValidByName
bool mdlLevel_isValidByName ( DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  ,
WCharCP  levelNameIn 
)

Check if level with specified name is a valid existing level.

Parameters
[in]modelRefInmodel-ref of level-table
[in]levelNameInlevel name
Returns
true if the level is valid, else false. Returns false if modelRefIn is invalid.
See also
mdlLevel_isValid mdlLevel_isValidByCode
StatusInt mdlLevel_moveElementLevel ( int *  numElementMovedOut,
DgnPlatform::LevelId  destLevelIdIn,
DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  sourceLevelIdIn,
bool  inEntireFileIn 
)

Move elements of source level to destination level.

The model-refs of both the source level and destination level are the same.

Parameters
[out]numElementMovedOutnumber of elements moved
[in]destLevelIdIndestination level to move elements to
[in]modelRefInmodel ref
[in]sourceLevelIdInsource level from which to elements from
[in]inEntireFileInif true, then move elements in entire file of modelRefIn, else move elements only in the specified model
Returns
ERROR if the model-ref or the level ids are invalid, else SUCCESS
StatusInt mdlLevel_reportUsage ( WStringR  reportStringOut,
DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn 
)

Generate a report that describes where a level is used in the context of the file of specified model-ref.

Parameters
[out]reportStringOutreport string
[in]modelRefInmodel ref
[in]levelIdInlevel id
Returns
ERROR if the model-ref or level id is invalid, else SUCCESS
See also
mdlLevel_getUsageMask mdlLevel_isUsed mdlLevel_getUsage mdlLevel_getElementCount
StatusInt mdlLevel_selectElement ( int *  numElementSelectedOut,
DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn 
)

Select elements on specified level.

Parameters
[out]numElementSelectedOutnumber of elements selected
[in]modelRefInsource model ref whose elements to copy
[in]levelIdInsource level from which to copy elements from
Returns
ERROR if the model-ref or the level ids are invalid, else SUCCESS
StatusInt mdlLevel_setActive ( DgnPlatform::LevelId  levelIdIn)

Set level as active.

Parameters
[in]levelIdInlevel id
Returns
ERROR if the level id is invalid or the level cannot be set as active
Remarks
Returns MSGID_errorElementAccessIsReadOnly if element-access mode of the level is set to LevelElementAccess::ReadOnly or LevelElementAccess::ViewOnly
See also
mdlLevel_isActive mdlLevel_getActive mdlLevel_setActiveByName mdlParams_setActive
StatusInt mdlLevel_setActiveByCode ( DgnPlatform::LevelCode  levelCodeIn)

Set level with specified code as active.

This function handles setting a library level as active. If the level with specified code is a library level, then, if necessary, the library level is copied into the current-file before setting the level active.

Parameters
[in]levelCodeInlevel code
Returns
ERROR if the level code is invalid or the level cannot be set as active, else SUCCESS
See also
mdlLevel_isActive mdlLevel_getActive mdlLevel_setActive mdlParams_setActive
StatusInt mdlLevel_setActiveByName ( DgnPlatform::LevelId  ,
WCharCP  levelNameIn 
)

Set level with specified name as active.

This function handles setting a library level as active. If the level with specified name is a library level, then, if necessary, the library level is copied into the current-file before setting the level active.

Parameters
[in]levelNameInlevel name
Returns
ERROR if the level name is invalid or the level cannot be set as active, else SUCCESS
See also
mdlLevel_isActive mdlLevel_getActive mdlLevel_setActive mdlParams_setActive
StatusInt mdlLevel_setCode ( DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn,
DgnPlatform::LevelCode  levelCodeIn 
)

Set level code.

A level's code should be unique in the context of all the levels in a level-table i.e. all level codes in the context of a level-table should be unique.

Remarks
A level code is displayed under the "Number" column of the level-manager.
Parameters
[in]modelRefInmodel-ref of level-table
[in]levelIdInlevel id
[in]levelCodeInlevel code
Returns
SUCCESS if the level code is successfully set.
Remarks
Possible return failure codes are:
MSGID_errorTableIsReadOnly
the level-table is in a read-only state
MSGID_errorCannotChangeAttachmentLevelCode
the specified model-ref is for an attachment
MSGID_errorLevelIsReadOnly
the specified level is in a read-only state
MSGID_errorCannotChangeExternalLevel
the specified level is a library level
MSGID_errorCannotChangeDefaultLevelCode
the specified level is the default level
MSGID_errorLevelCodeIsNull
the specified level code is LEVEL_NULL_CODE
MSGID_errorLevelCodeIsDuplicate
the specified level code is duplicate
ERROR
if model-ref or level id is invalid or the level code cannot be set for some unspecified reason
A successful level code set raises a LEVEL_CHANGE_CODE event.
Call mdlLevelTable_rewrite to save the updated level-table
See also
mdlLevel_getCode mdlLevelTable_rewrite
mdlLevelTable_rewrite
StatusInt mdlLevel_setColor ( DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn,
UInt colorIn,
bool *  colorOverrideIn 
)

Set level color.

This sets the color to apply on an element of the level, when "level symbology" is turned on for the view. This is also termed as the level's OVERRIDE color. Note that this function has an additional "override" flag. The "override" flag has to be ON in order to use the color.

Parameters
[in]modelRefInmodel-ref of level-table
[in]levelIdInlevel id
[in]colorInlevel color - may be NULL
[in]colorOverrideInlevel color override (true or false) - may be NULL
Returns
SUCCESS if the level color is successfully set.
Remarks
Possible return failure codes are:
MSGID_errorTableIsReadOnly
the level-table is in a read-only state
MSGID_errorLevelIsReadOnly
the specified level is in a read-only state
MSGID_errorCannotChangeExternalLevel
the specified level is a library level
ERROR
if model-ref or level id is invalid or the level color cannot be set for some unspecified reason
A successful level color set raises a LEVEL_CHANGE_ATTRIBUTE event.
Call mdlLevelTable_rewrite to save the updated level-table
If modelRefIn is a DgnPlatform::DgnAttachment, then colorIn (if defined) is assumed to identify a color in the referenced file.
See also
mdlLevel_getColor mdlLevel_getSymbology mdlLevel_setSymbology mdlLevelTable_rewrite
mdlLevel_getSymbology mdlLevel_setSymbology mdlLevelTable_rewrite
StatusInt mdlLevel_setDescription ( DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn,
WCharCP  descriptionIn 
)

Set level description.

Parameters
[in]modelRefInmodel-ref of level-table
[in]levelIdInlevel id
[in]descriptionInlevel name
Returns
SUCCESS if the level description is successfully set.
Remarks
Possible return failure codes are:
MSGID_errorTableIsReadOnly
the level-table is in a read-only state
MSGID_errorCannotChangeAttachmentLevelCode
the specified model-ref is for an attachment
MSGID_errorLevelIsReadOnly
the specified level is in a read-only state
MSGID_errorCannotChangeExternalLevel
the specified level is a library level
ERROR
if model-ref or level id is invalid or the level description cannot be set for some unspecified reason
A successful level description set raises a LEVEL_CHANGE_ATTRIBUTE event.
Call mdlLevelTable_rewrite to save the updated level-table
See also
mdlLevel_getDescription mdlLevelTable_rewrite
mdlLevelTable_rewrite
StatusInt mdlLevel_setDisplay ( DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn,
bool  displayIn 
)

Set level display on/off.

Turning off the display makes all the elements on the level invisible in all the views.

Remarks
Call mdlView_setLevelDisplay to control the level display in a specific view.
Parameters
[in]modelRefInmodel-ref of level-table
[in]levelIdInlevel id
[in]displayIndisplay flag - true or false
Returns
SUCCESS if the level display flag is successfully set.
Remarks
Possible return failure codes are:
MSGID_errorTableIsReadOnly
the level-table is in a read-only state
ERROR
if model-ref or level id is invalid or the level display cannot be set for some unspecified reason
A successful level display flag raises a LEVEL_CHANGE_DISPLAY event.
Call mdlLevelTable_rewrite to save the updated level-table
See also
mdlLevel_setDisplayMask mdlLevel_getDisplayMask mdlLevel_getDisplay mdlLevel_rewrite mdlView_setLevelDisplay mdlView_getLevelDisplay
mdlLevelTable_rewrite
StatusInt mdlLevel_setDisplayPriority ( DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn,
Int32  priorityIn 
)

Set level display priority.

Parameters
[in]modelRefInmodel-ref of level-table
[in]levelIdInlevel id
[in]priorityInlevel priority - may be NULL
Returns
SUCCESS if the level priority is successfully set.
Remarks
Possible return failure codes are:
MSGID_errorTableIsReadOnly
the level-table is in a read-only state
MSGID_errorLevelIsReadOnly
the specified level is in a read-only state
MSGID_errorCannotChangeExternalLevel
the specified level is a library level
ERROR
if model-ref or level id is invalid or the level color cannot be set for some unspecified reason
A successful priority set raises a LEVEL_CHANGE_ATTRIBUTE event.
Call mdlLevelTable_rewrite to save the updated level-table
See also
mdlLevel_getDisplayPriority mdlLevelTable_rewrite
StatusInt mdlLevel_setElementAccess ( DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn,
DgnPlatform::LevelElementAccess  elementAccessIn 
)

Set the level's element access mode.

This can take one of 4 values - LevelElementAccess::All, LevelElementAccess::Locked, LevelElementAccess::ReadOnly & LevelElementAccess::ViewOnly. The mode applies to elements on the level. The meaning attached to each of the modes is:

Access Mode Meaning
LevelElementAccess::All Elements on the level have all access. This is the default mode.
LevelElementAccess::Locked Elements on the level are locked. They can be copied, but cannot be modified or deleted. New elements can be added to the level - once added they are immediately locked. The level can be set active.
LevelElementAccess::ReadOnly Elements on the level are for read-only purposes. They cannot be modified or deleted. The elements may be copied into another level. The level cannot be set active.
LevelElementAccess::ViewOnly Elements on the level can only be viewed. They cannot be copied, modified or deleted. The level cannot be set active.
Parameters
[in]modelRefInmodel-ref of level-table
[in]levelIdInlevel id
[in]elementAccessInelement access - one of LEVEL_ELEMENT_ACCESS_... (defined in leveltypes.h)
Returns
SUCCESS if the level element access is successfully set.
Remarks
Possible return failure codes are:
MSGID_errorTableIsReadOnly
the level-table is in a read-only state
MSGID_errorLevelIsReadOnly
the specified level is in a read-only state
MSGID_errorTableIsOfAttachment
the specified model-ref is for an attachment
ERROR
if model-ref or level id is invalid or the level element access cannot be set for some unspecified reason
A successful level element access raises a LEVEL_CHANGE_ATTRIBUTE event.
Call mdlLevelTable_rewrite to save the updated level-table
See also
mdlLevel_getElementAccess mdlLevelTable_rewrite
mdlLevelTable_rewrite
StatusInt mdlLevel_setElementByLevel ( int *  numElementChangedOut,
DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn,
BitMaskP  elementAttributeStringIn,
bool  inEntireFileIn,
bool  isSetByLevel 
)

set or unset elements symbology to that of BYLEVEL.

Parameters
[out]numElementChangedOutnumber of elements changed
[in]modelRefInmodel ref
[in]levelIdInlevel to change elements symbology
[in]elementAttributeStringInmask of attributes, 1:color, 2:style, 3:weight
[in]inEntireFileInif true, then set elements symbology in entire file of modelrefIn, else set elements symbology only in the specified model
[in]isSetByLevelif true, then set elements symbology to that of BYLEVEL, else unset elements symbology to that of BYLEVEL.
Returns
ERROR if the model-ref or the level ids are invalid, else SUCCESS
StatusInt mdlLevel_setElementColor ( DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn,
UInt  colorIn 
)

Set element color.

This sets the color to apply on an element of the level, when the element has its color set to BYLEVEL. This is also be termed as the level's BYLEVEL color.

Parameters
[in]modelRefInmodel-ref of level-table
[in]levelIdInlevel id
[in]colorInelement color
Returns
SUCCESS if the level element color is successfully set.
Remarks
Possible return failure codes are:
MSGID_errorTableIsReadOnly
the level-table is in a read-only state
MSGID_errorLevelIsReadOnly
the specified level is in a read-only state
MSGID_errorCannotChangeExternalLevel
the specified level is a library level
MSGID_errorElementAccessIsReadOnly
the element-access for the level is atleast LevelElementAccess::ReadOnly
ERROR
if model-ref or level id is invalid or the element color cannot be set for some unspecified reason
A successful level element color set raises a LEVEL_CHANGE_ATTRIBUTE event.
Call mdlLevelTable_rewrite to save the updated level-table
If modelRefIn is a DgnPlatform::DgnAttachment, then colorIn (if defined) is assumed to identify a color in the referenced file.
See also
mdlLevel_getElementColor mdlLevel_getElementSymbology mdlLevel_setElementSymbology mdlLevelTable_rewrite
mdlLevel_getElementSymbology mdlLevel_setElementSymbology mdlLevelTable_rewrite
StatusInt mdlLevel_setElementMaterialId ( DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn,
DgnPlatform::ElementId  materialIdIn 
)

Set level element material id.

Parameters
[in]modelRefInmodel-ref of level-table
[in]levelIdInlevel id
[in]materialIdInmaterial id
Returns
SUCCESS if the level color is successfully set.
Remarks
Possible return failure codes are:
MSGID_errorTableIsReadOnly
the level-table is in a read-only state
MSGID_errorLevelIsReadOnly
the specified level is in a read-only state
MSGID_errorCannotChangeExternalLevel
the specified level is a library level
ERROR
if model-ref or level id is invalid or the level color cannot be set for some unspecified reason
A successful level material id set raises a LEVEL_CHANGE_ATTRIBUTE event.
Call mdlLevelTable_rewrite to save the updated level-table
If modelRefIn is a DgnPlatform::DgnAttachment, materialIdIn is assumed to identify a material in the referenced file.
See also
mdlLevel_getElementMaterialId
StatusInt mdlLevel_setElementStyle ( DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn,
int *  styleIn,
LineStyleParamsP  styleParamsIn 
)

Set element style.

This sets the style to apply on an element of the level, when the element has its style set to BYLEVEL. This is also be termed as the level's BYLEVEL style.

Parameters
[in]modelRefInmodel-ref of level-table
[in]levelIdInlevel id
[in]styleInelement style - maybe NULL
[in]styleParamsIncustom line style modifiers - maybe NULL
Returns
SUCCESS if the level element style is successfully set.
Remarks
Possible return failure codes are:
MSGID_errorTableIsReadOnly
the level-table is in a read-only state
MSGID_errorLevelIsReadOnly
the specified level is in a read-only state
MSGID_errorCannotChangeExternalLevel
the specified level is a library level
MSGID_errorElementAccessIsReadOnly
the element-access for the level is atleast LevelElementAccess::ReadOnly
ERROR
if model-ref or level id is invalid or the element style cannot be set for some unspecified reason
A successful level element style set raises a LEVEL_CHANGE_ATTRIBUTE event.
Call mdlLevelTable_rewrite to save the updated level-table
If modelRefIn is a DgnPlatform::DgnAttachment, then styleIn (if defined) is assumed to identify a style in the referenced file.
See also
mdlLevel_getElementStyle mdlLevel_getElementSymbology mdlLevel_setElementSymbology mdlLevelTable_rewrite
mdlLevel_getElementSymbology mdlLevel_setElementSymbology mdlLevelTable_rewrite
StatusInt mdlLevel_setElementSymbology ( DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn,
UInt colorIn,
int *  styleIn,
LineStyleParamsP  styleParamsIn,
UInt weightIn 
)

Set element symbology.

This functions allows setting the one or more of the element color, style, weight & fill color simultaneously.

Parameters
[in]modelRefInmodel-ref of level-table
[in]levelIdInlevel id
[in]colorInelement color - maybe NULL
[in]styleInelement style - maybe NULL
[in]styleParamsIncustom line style modifiers - maybe NULL
[in]weightInelement weight - maybe NULL
Returns
SUCCESS if the level element fill color is successfully set.
Remarks
Possible return failure codes are:
MSGID_errorTableIsReadOnly
the level-table is in a read-only state
MSGID_errorLevelIsReadOnly
the specified level is in a read-only state
MSGID_errorCannotChangeExternalLevel
the specified level is a library level
MSGID_errorElementAccessIsReadOnly
the element-access for the level is atleast LevelElementAccess::ReadOnly
ERROR
if model-ref or level id is invalid or the level element symbology cannot be set for some unspecified reason
A successful level element symbology set raises a LEVEL_CHANGE_ATTRIBUTE event.
Call mdlLevelTable_rewrite to save the updated level-table
If modelRefIn is a DgnPlatform::DgnAttachment, then colorIn and styleIn (if defined) must identify color and style in the referenced file.
See also
mdlLevel_getElementSymbology mdlLevelTable_rewrite
mdlLevelTable_rewrite
StatusInt mdlLevel_setElementWeight ( DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn,
UInt  weightIn 
)

Set element weight.

This sets the style to apply on an element of the level, when the element has its weight set to BYLEVEL. This is also be termed as the level's BYLEVEL weight.

Parameters
[in]modelRefInmodel-ref of level-table
[in]levelIdInlevel id
[in]weightInelement weight
Returns
SUCCESS if the level element weight is successfully set.
Remarks
Possible return failure codes are:
MSGID_errorTableIsReadOnly
the level-table is in a read-only state
MSGID_errorLevelIsReadOnly
the specified level is in a read-only state
MSGID_errorCannotChangeExternalLevel
the specified level is a library level
MSGID_errorElementAccessIsReadOnly
the element-access for the level is atleast LevelElementAccess::ReadOnly
ERROR
if model-ref or level id is invalid or the element weight cannot be set for some unspecified reason
A successful level element weight set raises a LEVEL_CHANGE_ATTRIBUTE event.
Call mdlLevelTable_rewrite to save the updated level-table
See also
mdlLevel_getElementWeight mdlLevel_getElementSymbology mdlLevel_setElementSymbology mdlLevelTable_rewrite
mdlLevel_getElementSymbology mdlLevel_setElementSymbology mdlLevelTable_rewrite
StatusInt mdlLevel_setFrozen ( DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn,
LevelFrozenType  frozenTypeIn,
bool  frozenIn 
)

Set level frozen on/off.

Turning on the frozen makes all the elements on the level invisible. This is like turning off the display flag of a level with the following differences:

  • If a cell-instance is on a frozen level, then all the elements of the cell-instance are not displayed, irrespective of the contained element's level.
  • If an attachment is on a frozen level, then the attachment is not displayed.
Remarks
There are two types of frozen controls described as follows:
LEVEL_FROZEN_TYPE_GLOBAL
Turning on the global frozen flag makes an element on the level invisible across every use of the element in the file.
LEVEL_FROZEN_TYPE_VP_FREEZE
Turning on the viewport frozen flag makes an element on the level invisible only in the context of the model-ref. The specified model-ref should be either a layout model-ref, or a viewport model-ref or an attachment model-ref of a layout or a viewport. If the specified model-ref is an attachment model-ref, then the global frozen flag is propagated to all the model-refs (within the layout or viewport) with same file-object as the specified model-ref.
Parameters
[in]modelRefInmodel
[in]levelIdInlevel id
[in]frozenTypeInone of LEVEL_FROZEN_TYPE_GLOBAL or LEVEL_FROZEN_TYPE_VP_FREEZE (defined in leveltable.h)
[in]frozenInfrozen flag - true or false
Returns
SUCCESS if the level freeze flag is successfully set.
Remarks
Possible return failure codes are:
MSGID_errorTableIsReadOnly
the level-table is in a read-only state
ERROR
if model-ref or level id is invalid or the level freeze cannot be set for some unspecified reason
A successful level freeze flag raises a LEVEL_CHANGE_DISPLAY event.
Call mdlLevelTable_rewrite to save the updated level-table
See also
mdlLevelTable_getFrozenMask mdlLevelTable_setFrozenMask mdlLevelTable_getDisplayFrozenMask mdlLevel_isFrozen mdlLevel_getFrozen
StatusInt mdlLevel_setHidden ( DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn,
bool  hiddenIn 
)

Set level hidden on/off.

A Hidden Level will not be visible in the User Interface i.e. none of the Level Controls will display such a level. Applications can use this together with Element Access set to READ_ONLY/VIEW_ONLY to throw elements into the design file that can only be viewed. Using regular Microstation, the user has no control over such elements. By default Hidden is OFF

Parameters
[in]modelRefInmodel-ref of level-table
[in]levelIdInlevel id
[in]hiddenInhidden flag - true or false
Returns
SUCCESS if the level hidden flag is successfully set.
Remarks
Possible return failure codes are:
MSGID_errorTableIsReadOnly
the level-table is in a read-only state
MSGID_errorLevelIsReadOnly
the specified level is in a read-only state
MSGID_errorTableIsOfAttachment
the specified model-ref is for an attachment
ERROR
if model-ref or level id is invalid or the level hidden cannot be set for some unspecified reason
A successful level hidden flag set raises a LEVEL_CHANGE_ATTRIBUTE event.
Call mdlLevelTable_rewrite to save the updated level-table
See also
mdlLevelTable_getHiddenMask mdlLevel_getHidden mdlLevel_isHidden mdlLevel_rewrite
mdlLevelTable_rewrite
StatusInt mdlLevel_setMaterialId ( DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn,
DgnPlatform::ElementId *  materialIdIn,
bool *  materialOverrideIn 
)

Set level material id.

Parameters
[in]modelRefInmodel-ref of level-table
[in]levelIdInlevel id
[in]materialIdInmaterial id - may be NULL
[in]materialOverrideInmaterial override (true or false) - may be NULL
Returns
SUCCESS if the level color is successfully set.
Remarks
Possible return failure codes are:
MSGID_errorTableIsReadOnly
the level-table is in a read-only state
MSGID_errorLevelIsReadOnly
the specified level is in a read-only state
MSGID_errorCannotChangeExternalLevel
the specified level is a library level
ERROR
if model-ref or level id is invalid or the level color cannot be set for some unspecified reason
A successful level material id set raises a LEVEL_CHANGE_ATTRIBUTE event.
Call mdlLevelTable_rewrite to save the updated level-table
If modelRefIn is a DgnPlatform::DgnAttachment, materialIdIn is assumed to identify a material in the referenced file.
See also
mdlLevel_getMaterialId
StatusInt mdlLevel_setName ( DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn,
WCharCP  nameIn 
)

Set level name.

A level's name should be unique in the level table.

Remarks
The following characters are disallowed in the level-name
  • "&lt" - the less than character
  • "&gt" - the greater than character
  • \ - the back-slash character
  • / - the slash character
  • . - the dot character
  • ' - the single quote character
  • " - the double quote character
  • ? - the question mark character
  • * - the star character
  • | - the vertical bar or pipe character
  • , - the comma character
  • = - the equals character
  • "&amp" - the and character
  • "\n" - the new-line character
  • "\t" - the tab character
A space character is valid character, though leading and trailing spaces are disallowed. This function will strip off leading and trailing spaces from the specified name.
Parameters
[in]modelRefInmodel-ref of level-table
[in]levelIdInlevel id
[in]nameInlevel name
Returns
SUCCESS if the level is successfully renamed.
Remarks
Possible return failure codes are:
MSGID_errorTableIsReadOnly
the level-table is in a read-only state
MSGID_errorCannotChangeAttachmentLevelName
the specified model-ref is for an attachment
MSGID_errorLevelIsReadOnly
the specified level is in a read-only state
MSGID_errorCannotChangeExternalLevel
the specified level is a library level
MSGID_errorCannotChangeDefaultLevelName
the specified level is the default level
MSGID_errorLevelNameIsNull
the specified level name is null
MSGID_errorLevelNameIsInvalid
the specified level name has invalid characters
MSGID_errorLevelNameIsDuplicate
the specified level name is duplicate
ERROR
if model-ref or level id is invalid or the level name cannot be set for some unspecified reason
A successful level name set raises a LEVEL_CHANGE_NAME event.
Call mdlLevelTable_rewrite to save the updated level-table
See also
mdlLevel_getName mdlLevel_getPathName mdlLevelName_hasValidCharacters mdlLevelName_replaceInvalidCharacters mdlLevelTable_rewrite
mdlLevelTable_rewrite
StatusInt mdlLevel_setPlot ( DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn,
bool  plotIn 
)

Set level plot on/off.

Turning off the plot disables plotting of all elements on the level.

Parameters
[in]modelRefInmodel-ref of level-table
[in]levelIdInlevel id
[in]plotInplot flag - true or false
Returns
SUCCESS if the level plot flag is successfully set.
Remarks
Possible return failure codes are:
MSGID_errorTableIsReadOnly
the level-table is in a read-only state
MSGID_errorLevelIsReadOnly
the specified level is in a read-only state
ERROR
if model-ref or level id is invalid or the level plot cannot be set for some unspecified reason
A successful level plot flag set raises a LEVEL_CHANGE_ATTRIBUTE event.
Call mdlLevelTable_rewrite to save the updated level-table
See also
mdlLevelTable_getPlotMask mdlLevel_getPlot mdlLevel_rewrite
mdlLevelTable_rewrite
StatusInt mdlLevel_setReadOnly ( DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn,
bool  isReadOnlyIn 
)

Set level read-only on/off.

Setting a level as read-only means that its attributes cannot be changed. (exception: setting the level's display on/off is not affected by this setting). A read-only level cannot be deleted.

Parameters
[in]modelRefInmodel-ref of level-table
[in]levelIdInlevel id
[in]isReadOnlyInread-only flag - true or false
Returns
SUCCESS if the level read-only flag is successfully set.
Remarks
Possible return failure codes are:
MSGID_errorTableIsReadOnly
the level-table is in a read-only state
MSGID_errorTableIsOfAttachment
the specified model-ref is for an attachment
MSGID_errorLevelIsActive
the specified level is active and if setting the level to read-only
ERROR
if model-ref or level id is invalid or the level read-only flag cannot be set for some unspecified reason
A successful level read-only flag set raises a LEVEL_CHANGE_ATTRIBUTE event.
Call mdlLevelTable_rewrite to save the updated level-table.
See also
mdlLevelTable_getReadOnlyMask mdlLevel_getReadOnly mdlLevel_isReadOnly mdlLevel_rewrite
mdlLevelTable_rewrite
StatusInt mdlLevel_setStyle ( DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn,
int *  styleIn,
LineStyleParamsP  styleParamsIn,
bool *  styleOverrideIn 
)

Set level style.

This sets the style to apply on an element of the level, when "level symbology" is turned on for the view. This is also termed as the level's OVERRIDE style. Note that this function has an additional "override" flag. The "override" flag has to be ON in order to use the style.

Parameters
[in]modelRefInmodel-ref of level-table
[in]levelIdInlevel id
[in]styleInlevel style - may be NULL
[in]styleParamsIncustom line style modifiers - may be NULL
[in]styleOverrideInlevel style override (true or false) - may be NULL
Returns
SUCCESS if the level style is successfully set.
Remarks
Possible return failure codes are:
MSGID_errorTableIsReadOnly
the level-table is in a read-only state
MSGID_errorLevelIsReadOnly
the specified level is in a read-only state
MSGID_errorCannotChangeExternalLevel
the specified level is a library level
ERROR
if model-ref or level id is invalid or the level style cannot be set for some unspecified reason
A successful level style set raises a LEVEL_CHANGE_ATTRIBUTE event.
Call mdlLevelTable_rewrite to save the updated level-table
If modelRefIn is a DgnPlatform::DgnAttachment, then piStyleIn (if defined) is assumed to identify a style in the referenced file.
See also
mdlLevel_getStyle mdlLevel_getSymbology msmthmdlLevel_setSymbologyC mdlLevelTable_rewrite
mdlLevel_getSymbology mdlLevel_setSymbology mdlLevelTable_rewrite
StatusInt mdlLevel_setSymbology ( DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn,
UInt colorIn,
bool *  colorOverrideIn,
int *  styleIn,
LineStyleParamsP  styleParamsIn,
bool *  styleOverrideIn,
UInt weightIn,
bool *  weightOverrideIn 
)

Set level symbology.

This functions allows setting the one or more of the level color, style, weight & fill color simultaneously.

Parameters
[in]modelRefInmodel-ref of level-table
[in]levelIdInlevel id
[in]colorInlevel color - maybe NULL
[in]colorOverrideInlevel color override (true or false) - maybe NULL
[in]styleInlevel style - maybe NULL
[in]styleParamsIncustom line style modifiers - maybe NULL
[in]styleOverrideInlevel style override (true or false) - maybe NULL
[in]weightInlevel weight - maybe NULL
[in]weightOverrideInlevel weight override (true or false) - maybe NULL
Returns
SUCCESS if the level symbology is successfully set.
Remarks
Possible return failure codes are:
MSGID_errorTableIsReadOnly
the level-table is in a read-only state
MSGID_errorLevelIsReadOnly
the specified level is in a read-only state
MSGID_errorCannotChangeExternalLevel
the specified level is a library level
ERROR
if model-ref or level id is invalid or the level symbology cannot be set for some unspecified reason
A successful level symbology set raises a LEVEL_CHANGE_ATTRIBUTE event.
Call mdlLevelTable_rewrite to save the updated level-table
If modelRefIn is a DgnPlatform::DgnAttachment, then colorIn and styleIn (if defined) must identify color and style in the referenced file.
See also
mdlLevel_getSymbology mdlLevelTable_rewrite
mdlLevelTable_rewrite
StatusInt mdlLevel_setTransparency ( DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn,
double  transparencyIn 
)

Set level display transparency.

This sets the display transparency to apply on an element of the level.

Parameters
[in]modelRefInmodel-ref of level-table
[in]levelIdInlevel id
[in]transparencyInlevel transparency (value between 0.0 & 1.0)
Returns
SUCCESS if the level transparency is successfully set.
Remarks
Possible return failure codes are:
MSGID_errorTableIsReadOnly
the level-table is in a read-only state
MSGID_errorLevelIsReadOnly
the specified level is in a read-only state
MSGID_errorCannotChangeExternalLevel
the specified level is a library level
ERROR
if model-ref or level id is invalid or the level color cannot be set for some unspecified reason
A successful level transparency set raises a LEVEL_CHANGE_ATTRIBUTE event.
Call mdlLevelTable_rewrite to save the updated level-table
See also
mdlLevel_getTransparency mdlLevelTable_rewrite
StatusInt mdlLevel_setWeight ( DgnModelRefP  modelRefIn,
DgnPlatform::LevelId  levelIdIn,
UInt weightIn,
bool *  weightOverrideIn 
)

Set level weight.

This sets the weight to apply on an element of the level, when "level symbology" is turned on for the view. This is also termed as the level's OVERRIDE weight. Note that this function has an additional "override" flag. The "override" flag has to be ON in order to use the weight.

Parameters
[in]modelRefInmodel-ref of level-table
[in]levelIdInlevel id
[in]weightInlevel weight
[in]weightOverrideInlevel weight override - true or false
Returns
SUCCESS if the level weight is successfully set.
Remarks
Possible return failure codes are:
MSGID_errorTableIsReadOnly
the level-table is in a read-only state
MSGID_errorLevelIsReadOnly
the specified level is in a read-only state
MSGID_errorCannotChangeExternalLevel
the specified level is a library level
ERROR
if model-ref or level id is invalid or the level weight cannot be set for some unspecified reason
A successful level weight set raises a LEVEL_CHANGE_ATTRIBUTE event.
Call mdlLevelTable_rewrite to save the updated level-table
See also
mdlLevel_getWeight mdlLevel_getSymbology mdlLevel_setSymbology mdlLevelTable_rewrite
mdlLevelTable_rewrite
BitMaskCP mdlLevelAttribute_getMask ( LevelAttributeMaskType  attributeTypeIn)

Return the level-attribute bit-mask for a given attribute list type.

Parameters
[in]attributeTypeInlevel attribute mask type to get
Returns
level attribute bit-mask for given type.
bool mdlLevelEnv_allowEditingOfNestedAttachmentLevels ( )

Check if editing of nested attachment levels is allowed.

Returns
true if editing of nested attachment levels is allowed, else false
StatusInt mdlLevelError_getMessage ( WStringR  errorMessageOut,
int  errorStatusIn 
)

Get a message string describing a returned level-error status.

Parameters
[out]errorMessageOuterror message
[in]errorStatusInerror status for which a message string is required
Returns
ERROR if error-message string cannot be got, else SUCCESS
int mdlLevelError_outputToMessageCenter ( DgnPlatform::OutputMessagePriority  errorMessagePriorityIn,
int  errorStatusIn 
)

Output to the message center a message string describing a returned level-error status.

Parameters
[in]errorMessagePriorityInerror message type. One of MESSAGE_.. types (defined in msdefs.h)
[in]errorStatusInerror status for which a message string is required
Returns
ERROR if error-message string cannot be got, else SUCCESS
LevelIteratorR mdlLevelIterator_create ( DgnModelRefP  modelRefIn)

Create a new level iterator.

Parameters
[in]modelRefInmodel ref, whose levels to iterate
Returns
if created then the new level iterator, else NULL
void mdlLevelIterator_free ( LevelIteratorR  levelIteratorIn)

Free a level iterator which is not required.

Parameters
[in]levelIteratorInlevel iterator to free
DgnPlatform::LevelId mdlLevelIterator_getFirst ( LevelIteratorR  levelIteratorIn)

Get first level.

Parameters
[in]levelIteratorInlevel iterator
Returns
The level-id of the first level
DgnPlatform::LevelId mdlLevelIterator_getNext ( LevelIteratorR  levelIteratorIn)

Get next level.

Parameters
[in]levelIteratorInlevel iterator
Returns
The level-id of the next level
StatusInt mdlLevelIterator_setIterateLibraryLevels ( LevelIteratorR  levelIteratorIn,
bool  iterateLibraryLevelsIn 
)

Set if library-levels of the iterator's model-ref should be iterated or not.

By default, the iterator does not iterate the library-levels of a model-ref. Since all levels in libraries are not used, the iterate type for libraries is always LEVEL_ITERATE_TYPE_ALL.

Parameters
[in]levelIteratorInlevel iterator
[in]iterateLibraryLevelsInIf true, then the iterator will iterate library-levels.
Returns
ERROR if level-iterator is invalid, else SUCCESS
StatusInt mdlLevelIterator_setIterateType ( LevelIteratorR  levelIteratorIn,
LevelIterateType  iterateTypeIn 
)

Set iteration type.

Parameters
levelIteratorInIN level iterator
[in]iterateTypeInone of LEVEL_ITERATE_TYPE_... (defined in leveltable.h)
Returns
ERROR if level-iterator is invalid, else SUCCESS
Remarks
The parameter iterateTypeIn gives a way to control which levels to iterate over as follows:
LEVEL_ITERATE_TYPE_ALL_LEVELS
Iterate over all levels - the default.
LEVEL_ITERATE_TYPE_USED_LEVELS
Iterate over all levels which have elements in specified model-ref of the iterator
LEVEL_ITERATE_TYPE_UNUSED_LEVELS
Iterate over all levels which have no elements in specified model-ref of the iterator
StatusInt mdlLevelIterator_setLevelFilter ( LevelIteratorR  levelIteratorIn,
DgnModelRefP  modelRefIn,
FilterID  filterIdIn 
)

Set a level filter through which iterated levels should pass through.

Parameters
[in]levelIteratorInlevel iterator
[in]modelRefInmodel ref of level filter
[in]filterIdInlevel filter
Returns
ERROR if level-iterator is invalid, else SUCCESS
StatusInt mdlLevelIterator_traverse ( LevelIteratorR  levelIteratorIn,
LevelIteratorTraverseCallback  userFunctionIn,
CallbackArgP  userArgIn 
)

Traverse through all level entries as specified in the iterator.

The call-back function is called for each level-entry.

Parameters
[in]levelIteratorInlevel iterator
[in]userFunctionInUser call-back function
[in]userArgInuser argument
Returns
ERROR if level-iterator is invalid, else SUCCESS
See also
LevelIteratorTraverseCallback
bool mdlLevelName_hasValidCharacters ( WCharCP  nameStringIn)

Check if specified Name String is valid.

Parameters
[in]nameStringInlevel name
Returns
true if the Name String is valid, else false
See also
mdlLevelName_setName mdlLevelName_replaceInvalidCharacters
void mdlLevelName_replaceInvalidCharacters ( WChar *  nameStringIn,
WChar  replacementCharIn 
)

Replace all invalid characters in specified Name String with another

character

Parameters
[in]nameStringInlevel name
[in]replacementCharInreplacement character
See also
mdlLevelName_setName mdlLevelName_hasValidCharacters

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