Functions
Element Location Criteria

Functions

void mdlLocate_allowLocked ()
 Obsolete enum; here only to help convert code. More...
 
void mdlLocate_noElemAllowLocked ()
 Set the Search Criteria as follows: More...
 
void mdlLocate_noElemNoLocked ()
 Set the Search Criteria as follows: More...
 
void mdlLocate_normal ()
 Set the Search Criteria as follows: More...
 
void mdlLocate_clearElemSearchMask (int numElems, int *elementNum)
 Turn off Element types in the Search Criteria. More...
 
void mdlLocate_setElemSearchMask (int numElems, int *elementNum)
 Set or clear Element types in the Search Criteria. More...
 
void mdlLocate_allowSelfRefs ()
 Set the Search Criteria to allow self-references of the Active Model. More...
 

Detailed Description

Function Documentation

void mdlLocate_allowLocked ( )

Obsolete enum; here only to help convert code.

Search Criteria Functions

MicroStation internally stores a Search Criteria that determine which elements are selected during the Element Location process.

The Search Criteria has three parts:

  • Element Type
  • Element Lock State
  • Model List

The Search Criteria Functions provide ways to set each of these parts so your tool will pick (only) the proper elements.

The Element Type criteria holds a flag for each known type of displayable element. If the flag is on, elements of that type will be considered eligible for selection. Otherwise they will be rejected.

the Element Lock State criteria determines whether locked elements are eligible for selection. An element is considered locked if its lock bit is on, if it is on a locked level, or if any of its children are locked.

The Model List criteria is simply a list of models that are eligible for selection. Set the Search Criteria as follows:

  • Element Type : All displayable elements
  • Element Lock state : All elements, locked or unlocked
  • Model List : All Models.
See also
mdlLocate_setElemSearchMask mdlLocate_clearElemSearchMask mdlLocate_normal mdlLocate_noElemNoLocked mdlLocate_noElemAllowLocked
void mdlLocate_allowSelfRefs ( )

Set the Search Criteria to allow self-references of the Active Model.

Generally, this is used in conjunction with mdlLocate_normal.

void mdlLocate_clearElemSearchMask ( int  numElems,
int *  elementNum 
)

Turn off Element types in the Search Criteria.

Remarks
This function should be called after mdlState_startModifyCommand or before mdlLocate_findElement.
Parameters
[in]numElemsnumber of entries in elementNum element number array
[in]elementNumelement number array. Each int holds one element type to be turned off.
See also
mdlLocate_normal mdlLocate_allowLocked mdlLocate_noElemNoLocked mdlLocate_noElemAllowLocked mdlLocate_setElemSearchMask
void mdlLocate_noElemAllowLocked ( )

Set the Search Criteria as follows:

  • Element Type : No element types located
  • Element Lock state : All elements, locked or unlocked
  • Model List : All Models.

This function is useful for finding only a few element types. After calling this function, call mdlLocate_setElemSearchMask with the element types to be located.

See also
mdlLocate_setElemSearchMask mdlLocate_clearElemSearchMask mdlLocate_normal mdlLocate_allowLocked mdlLocate_noElemNoLocked
void mdlLocate_noElemNoLocked ( )

Set the Search Criteria as follows:

  • Element Type : No element types located
  • Element Lock state : Only unlocked elements
  • Model List : All Models.

This function is useful for finding only a few element types. After calling this function, call mdlLocate_setElemSearchMask with the element types to be located.

See also
mdlLocate_setElemSearchMask mdlLocate_clearElemSearchMask mdlLocate_normal mdlLocate_allowLocked mdlLocate_noElemAllowLocked
void mdlLocate_normal ( )

Set the Search Criteria as follows:

  • Element Type : All displayable elements
  • Element Lock state : Only unlocked elements
  • Model List : Only Active Model.
See also
mdlLocate_setElemSearchMask mdlLocate_clearElemSearchMask mdlLocate_allowLocked mdlLocate_noElemNoLocked mdlLocate_noElemAllowLocked
void mdlLocate_setElemSearchMask ( int  numElems,
int *  elementNum 
)

Set or clear Element types in the Search Criteria.

Turns on the bits in the Element Type Search Criteria for each member of elementNumber.

Remarks
This function should be called after mdlState_startModifyCommand or before mdlLocate_findElement.
Parameters
[in]numElemsthe number of entries in the array elemenNum
[in]elementNuman array of ints. Each int holds one element type to be turned on or off.
See also
mdlLocate_normal mdlLocate_allowLocked mdlLocate_noElemNoLocked mdlLocate_noElemAllowLocked mdlLocate_clearElemSearchMask

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