Classes | Typedefs | Functions
Viewport Functions

Options control structure for fitting views. More...

Classes

struct  CameraInfo
 
struct  RenderFlags
 The flags that control rendering information. More...
 
struct  Latitude
 The flags that control solar/lighting positions. More...
 
struct  SolarTime
 The flags that control solar/lighting information. More...
 
struct  RenderInfo
 The flags that control rendering information. More...
 
struct  fitViewOptions
 
struct  namedViewProperties
 Name, name space and description for saved views. More...
 
struct  asynch_window_event
 The flags that control view information. More...
 
struct  v5RenderInfo
 The flags that control rendering information. More...
 

Typedefs

typedef int(* ViewFunc_Update )(bool isPreUpdate, DgnPlatform::DgnDrawMode eraseMode, DgnModelRefListP modelList, int numRegions, Asynch_update_view regions[], ViewContextP context, int numCovers[], MSDisplayDescr *displayDescr[])
 Callback that is called before or after each view updates. More...
 
typedef void(* ViewFunc_Motion )(MSWindowP window, int xCoord, int yCoord)
 Mdl applications typically show the user what is happening as the cursor moves using the dynamic functions (mdlState_dynamicUpdate and StateCallback::SetComplexDynamicsFunction). More...
 
typedef SubstituteElemStatus(* ViewFunc_SubstituteElem )(MSElementDescrH newElem, ViewportP viewport, DgnPlatform::DrawPurpose purpose, ViewContextP context, ElementHandleCP elem)
 Callback function to modify the display of elements in MicroStation views. More...
 
typedef struct fitViewOptions FitViewOptions
 
typedef int(* ViewIteratorFunctionP )(int *mayContinueP, UInt32 filePos, MSElementDescrCP eDP, CallbackArgP userDataP)
 UserFunction called when traversing saved views. More...
 
typedef struct namedViewProperties NamedViewProperties
 Name, name space and description for saved views. More...
 
typedef struct asynch_window_event Asynch_window_event
 The flags that control view information. More...
 
typedef struct v5RenderInfo V5RenderInfo
 The flags that control rendering information. More...
 

Functions

void mdlView_defaultCursor ()
 Cancel any special cursor behavior for MicroStation views and return to the default crosshair cursor. More...
 
int mdlView_fit (int viewNumber, DgnModelRefListP modelRefList)
 Scan the list of models indicated by modelRefList to set the display extents of view viewNumber to fit all found elements. More...
 
int mdlView_fitEx (int viewNumber, DgnModelRefListP modelRefList, bool doRasterRefFit, FitViewOptions const *options)
 Extended version of mdlView_fit. More...
 
bool mdlView_isModelActive (int viewIndex)
 Determine whether the model displayed in the specified view window is the currently active model. More...
 
bool mdlView_is3d (int viewNum)
 
DgnModelRefP mdlView_getRootModel (int viewIndex)
 Get the DgnModelRefP of the root model that is currently displayed in a specific view. More...
 
StatusInt mdlView_setModel (DgnModelRefP modelRef, int viewIndex)
 Set the given view's model ID. More...
 
int mdlView_getCamera (Dpoint3d *position, Dpoint3d *target, double *angle, double *focalLength, int *lensNumber, int view)
 Get the camera settings for a view. More...
 
int mdlView_getParameters (Dpoint3d *origin, Dpoint3d *center, Dpoint3d *delta, RotMatrixP rMatrix, double *activeZ, int view)
 Get the view settings for a view. More...
 
int mdlView_getParametersWithExpandedDepth (Dpoint3d *origin, Dpoint3d *center, Dpoint3d *delta, RotMatrixP rMatrix, double *activeZ, int view, bool expandDepth)
 Identical to mdlView_getParameters, excep that it has an additional argument that will optionally expand the depth for a 3D view with front or back clipping turned off to encompass all of the geometry in the view. More...
 
StatusInt mdlView_getStandard2 (RotMatrixP rMatrixP, DgnPlatform::StandardView stdViewNum, DgnModelRefP modelRef)
 Get one of the standard rotation matrices, relative to the active coordinate system of the specified model. More...
 
void mdlView_getStandard (RotMatrixP rMatrixP, DgnPlatform::StandardView stdViewNum)
 Get one of the standard rotation matrices. More...
 
int mdlView_getStandardCameraLens (double *angle, double *focalLength, int lensNumber)
 Return the camera angle and focal length for the standard camera lenses supported by MicroStation. More...
 
bool mdlView_isActive (int viewNumber)
 Determine whether a view is "active" (turned on). More...
 
int mdlView_isVisible (int viewNumber)
 Determine whether a view is visible. More...
 
DgnPlatform::StandardView mdlView_isStandard (RotMatrixCP trans)
 Determine whether a rotation matrix matches a standard view rotation matrix. More...
 
int mdlView_rotateToRMatrix (RotMatrixP rMatrix, int view)
 Rotate a view to the rotation matrix given by rMatrix. More...
 
int mdlView_setActiveDepth (int viewNumber, double depth)
 Change the active depth for a view. More...
 
int mdlView_setActiveDepthPoint (int viewNumber, Dpoint3d *points)
 Change the active depth for a view using a point on the new active depth plane. More...
 
int mdlView_setArea (int viewNumber, Dpoint3d const *pt, Dpoint3d const *zOrg, double zDelta, double actZdepth, RotMatrixCP rotMatrix)
 Set the viewing area for a view. More...
 
int mdlView_setCameraLens (double angle, int view)
 Set the camera lens angle for a view. More...
 
int mdlView_getDisplayControl (int paramNum, int viewNum)
 Get view display control attributes. More...
 
int mdlView_setDisplayControl (int paramNum, int viewNum, int value)
 Set view display control attributes. More...
 
int mdlView_setDisplayDepth (int viewNumber, double frontDepth, double backDepth)
 Change the front and back clipping planes for a view. More...
 
int mdlView_setDisplayDepthPoints (int viewNumber, Dpoint3d *points)
 Change the front and back clipping planes for a view using two points. More...
 
static ViewFunc_Update SetUpdatePreFunction (ViewFunc_Update newFunc)
 An MDL application can use this to set a function to be called before a view updates. More...
 
static ViewFunc_Update SetUpdatePostFunction (ViewFunc_Update newFunc)
 An MDL application can use this to set a function to be called after a view updates. More...
 
static ViewFunc_Motion SetMotionFunction (ViewFunc_Motion newFunc)
 An MDL application can use this to set a function to be called when the cursor moved in a view. More...
 
static ViewFunc_Motion SetNoMotionFunction (ViewFunc_Motion newFunc)
 An MDL application can use this to set a function to be called when the cursor is stopped in a view. More...
 
static ViewFunc_SubstituteElem SetSubstituteElemFunction (ViewFunc_SubstituteElem substFunc)
 Set or clear an "element substitution hook" to modify the display of elements in MicroStation views. More...
 
DItem_PulldownMenumdlView_setPopupMenu (UInt32 menuType, long menuId, MdlDesc *ownerMD)
 Set the menu that pops up when the user presses <shift-reset> inside a MicroStation view. More...
 
void mdlView_synchWithTCB (int viewNumber)
 Synchronizes the private view information that MicroStation maintains separately for each view with the "public" view information that is maintained in the TCB. More...
 
int mdlView_turnOff (int viewNumber)
 Turn off a MicroStation view. More...
 
int mdlView_turnOn (int viewNumber)
 Turn on a MicroStation View using the current view parameters. More...
 
int mdlView_reopen (int viewNumber)
 Close and reopen the view specified by viewNumber. More...
 
void mdlView_updateMulti (bool viewDraw[], bool incremental, DgnPlatform::DgnDrawMode drawMode, DgnModelRefListP modelRefList, bool startEndMsg)
 Update one or more views. More...
 
void mdlView_updateMultiEx (bool viewDraw[], bool incremental, DgnPlatform::DgnDrawMode drawMode, DgnModelRefListP modelRefList, bool startEndMsg, bool updateViewTitle)
 Update one or more views. More...
 
int mdlView_updateSingle (int viewNumber)
 Update a single view. More...
 
int mdlView_zoom (int outView, int inView, Dpoint3d const *centerPoint, double zoomFactor)
 Change a view's viewing extents. More...
 
int mdlView_pointToScreen (Point2dP screenPointP, DPoint3dCP uorPointP, int viewNumber, DgnPlatform::DgnCoordSystem coordinateSystem)
 Calculate a screen position for an input point. More...
 
int mdlView_screenToPoint (DPoint3dP uorPointP, Point2d *screenPointP, int viewNumber, DgnPlatform::DgnCoordSystem coordSystem)
 Calculates the world coordinates given a point on the screen. More...
 
void mdlView_getViewRectangle (BSIRect *viewRectP, MSWindow *windowP, DgnPlatform::DgnCoordSystem coordSystem)
 Get the screen area taken up by a view. More...
 
int mdlView_queuePartialUpdate (int viewNumber, BSIRect *rectsP, int numRects)
 Update one or more subparts of a MicroStation view. More...
 
int mdlView_newWindowCenter (int viewNumber, DPoint3dCP newCenterP)
 Set a new window center without changing the orientation or scale of the view. More...
 
void mdlView_pan (Point2d const *distance, int viewNumber, bool doUpdate)
 Move a view by a specified number of pixels, relative to it's current location. More...
 
int mdlView_indexFromWindow (MSWindow *window)
 Get the view number from a pointer to the MSWindow of the view. More...
 
int mdlView_setCameraParameters (Dpoint3d *positionP, Dpoint3d *targetP, Dpoint3d *upVectorP, double *angleP, double *aspectRatioP, DRange2dP screenWindowP, double *frontClipDist, double *backClipDist, int view)
 Set the camera parameters for a view. More...
 
double mdlView_cameraLensLengthFromAngle (double angle)
 Get the length in millimeters of a camera lens that corresponds to the specified field of vision angle in degrees. More...
 
double mdlView_cameraLensAngleFromLength (double focalLength)
 Get the angle of the field of vision in degrees for a camera lens of the specified focal length in millimeters. More...
 
int mdlView_computeCameraRotMatrix (RotMatrixP rotMatrix, DPoint3dCP viewZ, DPoint3dCP upVector)
 Compute the rotation matrix of the camera for the view. More...
 
int mdlView_getCameraParameters (Dpoint3d *positionP, Dpoint3d *targetP, Dpoint3d *upVectorP, double *angleP, DRange2dP screenWindowP, double *frontClipDist, double *backClipDist, int view)
 Get the camera parameters for a view. More...
 
StatusInt mdlView_getHomogeneousMaps (DPoint4d *worldEye, DPoint4d *viewEye, DMap4d *worldToViewMap, DMap4d *worldToNPCMap, DMatrix4d *worldToFocalPlane, DMatrix4d *viewToFocalPlane, double *focalLength, double *nPCFocalPlaneDepth, int viewNumber)
 Retrieve various homogeneous maps for a MicroStation view transform. More...
 
BitMaskCP mdlView_getLevelDisplayMask (DgnModelRefP modelRef, int iViewNum, DgnPlatform::ViewLevelDisplayType levelDisplayType)
 Get the level-mask for a model and view number. More...
 
int mdlView_setLevelDisplayMask (DgnModelRefP modelRef, int iViewNum, BitMaskCP pViewLevelMask, bool doUpdate)
 Set the level display mask for the specified model and view. More...
 
int mdlView_changeLevelDisplayMask (DgnModelRefP modelRef, int iViewNum, BitMaskCP levelMask, LevelMaskOperation operation, bool doUpdate)
 Change the level display for specified model and view. More...
 
int mdlView_setLevelDisplayMaskMulti (DgnModelRefP modelRef, bool *viewList, BitMaskCP viewLevelMask, bool doUpdate)
 Set the level mask for multiple views from the given level mask. More...
 
int mdlView_changeLevelDisplayMaskMulti (DgnModelRefP modelRef, bool *viewList, BitMaskCP levelMask, LevelMaskOperation operation, bool doUpdate)
 Change the display flag. More...
 
int mdlView_getLevelDisplay (bool *viewLevelDisplay, DgnModelRefP modelRef, int iViewNum, DgnPlatform::LevelId iLevelId, DgnPlatform::ViewLevelDisplayType levelDisplayType)
 Determine whether a level is displayed in a view. More...
 
int mdlView_setLevelDisplay (DgnModelRefP modelRef, int iViewNum, DgnPlatform::LevelId iLevelId, bool levelDisplay)
 Set the display of a level in a view. More...
 
int mdlView_getLevels (short *v7LevelMask, int iViewNumIn)
 Get information about the levels that are on for the master design file for a view. More...
 
StatusInt mdlView_updateViewInfo (ViewInfoCP viewInfoP)
 Update the global view information to match the data passed to this function. More...
 
int mdlView_getMaxCount ()
 Get the maximum number of views that can be opened by MicroStation. More...
 
bool mdlView_isValidIndex (int index)
 Test whether a value is a valid view index value. More...
 
StatusInt mdlView_getFlags (DgnPlatform::ViewFlags *viewFlags, int viewIndex)
 Get the view settings flags for a view. More...
 
StatusInt mdlView_setFlags (DgnPlatform::ViewFlags *viewFlags, int viewIndex)
 Set the view settings flags for a view. More...
 
StatusInt mdlView_copyCamera (DgnPlatform::CameraInfo *cameraInfo, int index)
 Retrieve a copy of the current camera information from the specified view. More...
 
StatusInt mdlView_attachNamed (WCharCP inName, WCharCP inNameSpace, int viewNumber)
 Search for a named view by its name and, if found, attach the view to the indicated view. More...
 
void mdlView_setUpApplyOpts (Bentley::DgnPlatform::ApplyViewOptions *applyOptsP, int type)
 Set initial values for viewport info options. More...
 
StatusInt mdlView_attachNamedWithOptions (WCharCP inName, WCharCP inNameSpace, int viewNumber, Bentley::DgnPlatform::ApplyViewOptions const *applyOptsP)
 Search for a named view by its name and, if found, attach the view to the indicated view using the given options. More...
 
StatusInt mdlView_saveNamed (WCharCP viewNameP, WCharCP descriptionP, WCharCP viewNameSpace, int view)
 Save the current settings for one of the view windows to a named view element using the given name and description. More...
 
StatusInt mdlView_deleteNamed (WCharCP inName, WCharCP inNameSpace)
 Find a named view element with the specified name and, if found, delete it. More...
 
StatusInt mdlView_findNamed (DgnPlatform::ViewInfoPtr *viewInfoP, DgnPlatform::ViewPortInfoPtr *viewPortInfoP, WCharCP viewName, WCharCP viewNameSpace)
 Search for a named view of the specified name and, if found, retrieve the view and viewport information from the view element. More...
 
void mdlView_getDefaultFlags (DgnPlatform::ViewFlags *viewFlagsP)
 Set the flags in the given DgnPlatform::ViewFlags structure to their default setting. More...
 
StatusInt mdlView_fitToFence (Dpoint2d *fencePtsP, int viewIndex, long numPoints)
 Fit the contents of the current fence in the specified view. More...
 
StatusInt mdlView_fitViewToRange (DPoint3dCP minP, DPoint3dCP maxP, FitViewOptions const *optionsP, int viewIndex)
 Fit the contents of the specified range in the given view. More...
 
bool mdlView_treatAs3D (int viewIndex)
 Determine whether the specified view should be treated as 3D. More...
 
StatusInt mdlView_setClipBoundaryElement (int viewIndex, DgnPlatform::ElementId elementID)
 Set the view's clip volume. More...
 
StatusInt mdlView_getClipBoundaryElement (DgnPlatform::ElementId *pElementId, int viewIndex)
 Get the view's clip volume. More...
 
StatusInt mdlView_setClipMaskElement (int viewIndex, DgnPlatform::ElementId elementID)
 Set the view's clip mask. More...
 
StatusInt mdlView_getClipMaskElement (DgnPlatform::ElementId *pElementId, int viewIndex)
 Get the view's clip volume. More...
 
ViewportP mdlView_getViewport (int viewIndex)
 Get an DgnPlatform::Viewport by view index. More...
 
WCharCP mdlView_getToolBoxPath (int viewIndex, int toolBoxIndex, bool b3D)
 Get a path to the view toolbox by view index and toolbox index. More...
 
void mdlView_setToolBoxPath (int viewIndex, int toolBoxIndex, bool b3D, WCharCP pToolBoxPath)
 Set the view toolbox based on path by view index and toolbox index. More...
 
WCharCP mdlView_getToolBoxName (int viewIndex, int toolBoxIndex, bool b3D)
 Get a name to the view toolbox by view index and toolbox index. More...
 
void mdlView_setToolBoxName (int viewIndex, int toolBoxIndex, bool b3D, WCharCP pToolBoxName)
 Set the view toolbox based on name by view index and toolbox index. More...
 
RscId mdlView_getToolBoxId (int viewIndex, int toolBoxIndex, bool b3D)
 Get a id to the view toolbox by view index and toolbox index. More...
 
void mdlView_setToolBoxId (int viewIndex, int toolBoxIndex, bool b3D, RscId toolBoxId)
 Set the view toolbox based on id by view index and toolbox index. More...
 
void mdlView_reloadToolBoxes (int viewIndex)
 Reload the toolboxes for a given view based on view index. More...
 
bool mdlView_getViewToolsDisplay (int viewIndex)
 Get whether the view toolboxes are displayed for a given view index. More...
 
void mdlView_setViewToolsDisplay (int viewIndex, bool display)
 Set whether the view toolboxes are displayed for a given view index. More...
 
DgnPlatform::ISprite * mdlViewManager_loadSpriteFromRsrc (int rsrcId, HINSTANCE *hInstancePtr)
 Create a sprite from a resource . More...
 
DgnPlatform::ISprite * mdlViewManager_createSpriteFromIcon (HICON *icon, bool useAlpha)
 Create a sprite from an icon . More...
 
 ADD_BENTLEY_ENUM_TYPEDEF (MstnPlatform::Element, ElementTemplateStatus, ElementTemplateStatusEnum) typedef struct asynch_update_view
 The flags that control view information. More...
 

Detailed Description

Options control structure for fitting views.

Typedef Documentation

The flags that control view information.

Name, name space and description for saved views.

typedef struct v5RenderInfo V5RenderInfo

The flags that control rendering information.

typedef void(* ViewFunc_Motion)(MSWindowP window, int xCoord, int yCoord)

Mdl applications typically show the user what is happening as the cursor moves using the dynamic functions (mdlState_dynamicUpdate and StateCallback::SetComplexDynamicsFunction).

However, applications that need to show another indicator can use the cursor motion and no-motion functions.

Parameters
[in]MSWindowPpoints to the window containing the cursor.
[in]xCoordcursor location x
[in]yCoordcursor location y
Remarks
xCoord and yCoord represent the cursor location in global coordinates. Call mdlWindow_pointToLocal to get the coordinates in local units.
See also
ViewCallback::SetMotionFunction ViewCallback::SetNoMotionFunction
Remarks
Required Library: mdlbltin.lib
typedef SubstituteElemStatus(* ViewFunc_SubstituteElem)(MSElementDescrH newElem,ViewportP viewport, DgnPlatform::DrawPurpose purpose, ViewContextP context, ElementHandleCP elem)

Callback function to modify the display of elements in MicroStation views.

This callback replaces the previous UPDATE_EACH_ELEMENT hook from mdlView_setFunction.

Parameters
[out]newEleman element descriptor that will be used in place of the input element. To change a property of an element, implementers should duplicate the DgnPlatform::MSElementDescr from elem, modifiy the duplicate, and return it as *newElem.
[in]viewportthe viewport in which the element is being displayed.
[in]purposethe purpose for which the element is being displayed.
[in]contextthe "context" that is performing the display. (NOTE: this value is currently not useful for application callers and is provided for future compatibility).
[in]elemthe element being displayed.
Returns
Implementers should return: SUBSTELEM_STATUS_Normal to indicate that the element should be displayed normally, SUBSTELEM_STATUS_Block to indicate that the element should NOT be displayed at all,
Remarks
Required Library: mdlbltin.lib
typedef int(* ViewFunc_Update)(bool isPreUpdate, DgnPlatform::DgnDrawMode eraseMode, DgnModelRefListP modelList, int numRegions, Asynch_update_view regions[], ViewContextP context, int numCovers[], MSDisplayDescr *displayDescr[])

Callback that is called before or after each view updates.

Parameters
[in]isPreUpdatetrue if the view has not been updated yet.
[in]eraseMode,indicatesthe mode with which MicroStation is drawing elements on the screen.
[in]modelList,alist of models involved in the update.
[in]numRegions,givesthe number of regions being updated. The regions being updated to not necessarily correspond to the views, although they will all be contained in views.
[in]regions,anarray of structures describing the regions being updated. The elements of this array give all view-related information required for each region.
[in]context,Theview context.
[in]numCoversparam[in] displayDescr an array of pointers to structures of display descriptors. With one descriptor for each region to be updated.
Returns
When called for a pre-update, return zero to continue the update or non-zero to cancel the update. The return value is ignored for post-updates.
See also
ViewCallback::SetUpdatePreFunction ViewCallback::SetUpdatePostFunction
Remarks
Required Library: mdlbltin.lib
typedef int(* ViewIteratorFunctionP)(int *mayContinueP, UInt32 filePos, MSElementDescrCP eDP, CallbackArgP userDataP)

UserFunction called when traversing saved views.

Parameters
[out]mayContinuePtrue means keep going, false means stop now.
[in]filePosfile position of current element.
[in]eDPpointer to the element descr holding the element, do not free this.
[in]userDataPuser argument that specified in the mdlView_traverseNamedViews function.
Returns
SUCCESS if the user callback was able to perform the operation without error, non-SUCCESS otherwise.

Function Documentation

ADD_BENTLEY_ENUM_TYPEDEF ( MstnPlatform::Element  ,
ElementTemplateStatus  ,
ElementTemplateStatusEnum   
)

The flags that control view information.

StatusInt mdlView_attachNamed ( WCharCP  inName,
WCharCP  inNameSpace,
int  viewNumber 
)

Search for a named view by its name and, if found, attach the view to the indicated view.

Parameters
[in]inNamethe name of the named view element to be searched for.
[in]inNameSpacethe name space of the named view element to be searched for, using NULL will cause the search to go against the user managed named views. Using a value other than NULL allows applications to attach named views not available to the user via the saved views application.
[in]viewNumberthe view number to which the found view will be attached.
Returns
SUCCESS if the named view is found and attached, MDLERR_OPERVIOLATESCONSTRAINTS if the view is found but incompletely attached, otherwise ERROR.
See also
mdlView_setUpApplyOpts mdlView_attachNamedWithOptions
Remarks
Required Library: mdlbltin.lib
StatusInt mdlView_attachNamedWithOptions ( WCharCP  inName,
WCharCP  inNameSpace,
int  viewNumber,
Bentley::DgnPlatform::ApplyViewOptions const *  applyOptsP 
)

Search for a named view by its name and, if found, attach the view to the indicated view using the given options.

Parameters
[in]inNamethe name of the named view element to be searched for.
[in]inNameSpacethe name space of the named view element to be searched for, using NULL will cause the search to go against the user managed named views. Using a value other than NULL allows applications to attach named views not available to the user via the saved views application.
[in]viewNumberthe view number to which the found view will be attached.
[in]applyOptsPNULL for default or the options to use for the attach process.
Returns
SUCCESS if the named view is found and attached, MDLERR_OPERVIOLATESCONSTRAINTS if the view is found but incompletely attached, otherwise ERROR.
See also
mdlView_setUpApplyOpts mdlView_attachNamed
Remarks
Required Library: mdlbltin.lib
double mdlView_cameraLensAngleFromLength ( double  focalLength)

Get the angle of the field of vision in degrees for a camera lens of the specified focal length in millimeters.

Parameters
[in]focalLengthlength (mm)
Returns
the field of vision angle in degrees
See also
mdlView_setCameraParameters
Remarks
Required Library: mdlbltin.lib
double mdlView_cameraLensLengthFromAngle ( double  angle)

Get the length in millimeters of a camera lens that corresponds to the specified field of vision angle in degrees.

This length is useful to users who relate to lens lengths rather than angles.

Parameters
[in]angleangle (degrees)
Returns
the camera lens focal length in millimeters that yields the specified field of vision in degrees
See also
mdlView_setCameraParameters
Remarks
Required Library: mdlbltin.lib
int mdlView_changeLevelDisplayMask ( DgnModelRefP  modelRef,
int  iViewNum,
BitMaskCP  levelMask,
LevelMaskOperation  operation,
bool  doUpdate 
)

Change the level display for specified model and view.

The levels that are to be turned On, Off, or Toggled are specified in the form of a bit-mask.

Parameters
[in]modelRefmodel
[in]iViewNumview number.
[in]levelMaskbit-mask of levels whose display mode is to be changed as per operation.
[in]operationindicates whether levels specifed in levelMask are to be turned on, off, or toggled.
[in]doUpdateIf ON, then redraw the view.
Returns
SUCCESS
See also
mdlView_setLevelDisplayMask mdlView_getLevelDisplayMask mdlView_getLevelDisplay mdlView_setLevelDisplay mdlView_setLevelDisplayMaskMulti mdlView_changeLevelDisplayMaskMulti
Remarks
Required Library: mdlbltin.lib
int mdlView_changeLevelDisplayMaskMulti ( DgnModelRefP  modelRef,
bool *  viewList,
BitMaskCP  levelMask,
LevelMaskOperation  operation,
bool  doUpdate 
)

Change the display flag.

This functions similar to mdlView_changeLevelDisplayMask, except that it applies the operation to the levels of the list of specified views.

Parameters
[in]modelRefmodel
[in]viewListis an array of DgnPlatform::MAX_VIEWS bool each representing a view. A non-zero value indicates that view is to be updated from the BitMask given by "pLevelMask".
[in]levelMaskbit-mask of levels whose display mode is to be changed as per operation
[in]operationindicates whether levels specifed in levelMask are to be turned on, off, or toggled.
[in]doUpdateif ON, then redraw the view.
Returns
SUCCESS
See also
mdlView_setLevelDisplayMask mdlView_getLevelDisplayMask mdlView_getLevelDisplay mdlView_setLevelDisplay mdlView_changeLevelDisplay mdlView_setLevelDisplayMaskMulti
Remarks
Required Library: mdlbltin.lib
int mdlView_computeCameraRotMatrix ( RotMatrixP  rotMatrix,
DPoint3dCP  viewZ,
DPoint3dCP  upVector 
)

Compute the rotation matrix of the camera for the view.

Parameters
[out]rotMatrixthe computed rotation matrix
[in]viewZthe Z axis of the view
[in]upVectorthe up vector for the camera
Returns
SUCCESS if the rotation matrix was calculated successfully.
Remarks
Required Library: mdlbltin.lib
See also
mdlView_setCameraParameters
StatusInt mdlView_copyCamera ( DgnPlatform::CameraInfo *  cameraInfo,
int  index 
)

Retrieve a copy of the current camera information from the specified view.

Parameters
[out]cameraInfothe copied camera information.
[in]indexthe view number from which the camera information is copied.
Returns
SUCCESS if the camera information is copied successfully, or MDLERR_BADVIEWNUMBER if the index number is not a valid view number.
See also
mdlView_copyViewInfo
Remarks
Required Library: mdlbltin.lib
void mdlView_defaultCursor ( )

Cancel any special cursor behavior for MicroStation views and return to the default crosshair cursor.

See also
mdlState_clear mdlState_startModifyCommand
StatusInt mdlView_deleteNamed ( WCharCP  inName,
WCharCP  inNameSpace 
)

Find a named view element with the specified name and, if found, delete it.

Parameters
[in]inNamethe name of the view element to be deleted.
[in]inNameSpacethe name space of the named view element to be searched for, using NULL will cause the search to go against the user managed named views. Using a value other than NULL allows applications to delete named views not available to the user via the saved views application.
Returns
SUCCESS if the element is found and deleted, otherwise ERROR.
See also
mdlView_findNamed
Remarks
Required Library: mdlbltin.lib
StatusInt mdlView_findNamed ( DgnPlatform::ViewInfoPtr *  viewInfoP,
DgnPlatform::ViewPortInfoPtr *  viewPortInfoP,
WCharCP  viewName,
WCharCP  viewNameSpace 
)

Search for a named view of the specified name and, if found, retrieve the view and viewport information from the view element.

Parameters
[out]viewInfoPthe view information returned in a DgnPlatform::ViewInfo structure. If this information is not needed, pass NULL to the function in this argument.
[out]viewPortInfoPthe view port information returned in a DgnPlatform::ViewPortInfo structure.
[in]viewNamethe name of the view to search for in the master design file.
[in]viewNameSpacesaved view name space, NULL means public, user managed save views.
Returns
SUCCESS if the element is found and the information is retrieved successfully, otherwise ERROR.
See also
mdlView_locate mdlView_load
Remarks
Required Library: mdlbltin.lib
int mdlView_fit ( int  viewNumber,
DgnModelRefListP  modelRefList 
)

Scan the list of models indicated by modelRefList to set the display extents of view viewNumber to fit all found elements.

Parameters
[in]viewNumberdesignates which view to fit (starting with 0 for the view labeled View 1).
[in]modelRefListcontains the list of models to include in the view.
Remarks
After calling mdlView_fit, you must update the view to see the changed view extents using mdlView_updateSingle.
Returns
SUCCESS if the view extents were modified, MDLERR_BADVIEWNUMBER if viewNumber is invalid, and ERROR if no elements were found and the view extents were not modified.
See also
mdlView_updateSingle
Remarks
Required Library: mdlbltin.lib
int mdlView_fitEx ( int  viewNumber,
DgnModelRefListP  modelRefList,
bool  doRasterRefFit,
FitViewOptions const *  options 
)

Extended version of mdlView_fit.

Parameters
[in]viewNumberdesignates which view to fit (starting with 0 for the view labeled View 1).
[in]modelRefListcontains the list of models to include in the view.
[in]doRasterRefFitif true, include raster references in fit calculations.
[in]optionsthe FitViewOptions to apply to the view
Remarks
After calling mdlView_fitEx, you must update the view to see the changed view extents using mdlView_updateSingle.
Returns
SUCCESS if the view extents were modified, MDLERR_BADVIEWNUMBER if viewNumber is invalid, and ERROR if no elements were found and the view extents were not modified.
See also
mdlView_updateSingle
Remarks
Required Library: mdlbltin.lib
StatusInt mdlView_fitToFence ( Dpoint2d fencePtsP,
int  viewIndex,
long  numPoints 
)

Fit the contents of the current fence in the specified view.

Parameters
[in]fencePtsPthe array of points that are vertices of the fence
[in]viewIndexthe view in which the fence contents are fit
[in]numPointsthe number of points in the fence
Returns
SUCCESS if the operation is completed successfully
Remarks
Required Library: mdlbltin.lib
StatusInt mdlView_fitViewToRange ( DPoint3dCP  minP,
DPoint3dCP  maxP,
FitViewOptions const *  optionsP,
int  viewIndex 
)

Fit the contents of the specified range in the given view.

Parameters
[in]minPthe minimum X Y and Z values of the range
[in]maxPthe maximum X Y and Z values of the range
[in]optionsPthe FitViewOptions to apply to the view when it is redrawn
[in]viewIndexthe index of the view to fit the specified range block in
Remarks
Range points need to be in the view coordinate system, see mdlRMatrix_multiplyRange.
Unlike many other view functions, this function expects points in design file coordinates, so apply the currtrans via mdlCurrTrans_transformPointArray.
Returns
SUCCESS if the view is redrawn without error.
Remarks
Required Library: mdlbltin.lib
int mdlView_getCamera ( Dpoint3d position,
Dpoint3d target,
double *  angle,
double *  focalLength,
int *  lensNumber,
int  view 
)

Get the camera settings for a view.

All settings other than viewNumber are returned in the current coordinate system. If any settings are NULL, MicroStation does not fill them in.

Parameters
[out]positiona Dpoint3d to receive the camera position.
[out]targeta Dpoint3d to receive the camera target.
[out]anglea double to contain the camera field of vision angle in degrees.
[out]focalLengthalternative way to express the camera angle in parameters that correspond to the standard 35 millimeter camera. focalLength points to a double to contain the focal length in millimeters.
[out]lensNumberan integer specifying standard 35 mm lense
[in]viewindex of view
Remarks
MicroStation allows 3D design files to be viewed using either a parallel (orthographic) or perspective projection. The perspective projection mimics a physical camera in which light rays pass through a lens, converge at a focal point and focus on an image plane. The distance from the camera to the image plane is referred to as the focal length.
In orthographic (non-camera) views, the view is specified by a transformation matrix to the view coordinate system and a rectangular clipping volume. In camera views, the view volume is a pyramid with the apex at the camera and the cross section increasing with distance from the camera. In specifying a camera view, it is more convenient to think in terms of the camera location, orientation, focal length and fore and aft clipping planes. Camera views are derived from the view settings, the camera position, and the camera focal length in the following manner: The view transformation matrix specifies the camera orientation; the virtual camera points along the negative view Z-axis; the camera X and Y axis coincide with view axes. The front and back clipping planes are identical to the clipping planes for an orthographic view, and the camera image plane is parallel to the view and is offset from the camera position by the focal length. The portion of the image displayed is determined by the intersection of the orthographic view volume with the camera image plane.
Several important aspects of MicroStation's camera views should be noted:

Obviously, it is not possible to display items that are behind the camera,and items that are very close to the camera also cause problems as they end up being magnified excessively. MicroStation therefore truncates views at a fixed fraction of the focal length (approximately 1/50), effectively ignoring the tip of the viewing pyramid.

Remarks
Unlike most conventional cameras, the camera location is not necessarily centered in the view. This makes it possible to set the camera position and then "pan" within the image. MicroStation's window, pan and zoom commands do not alter the camera settings, instead altering only the view settings to control the portion of the image plane being displayed. This is analogous to taking a picture and then panning, zooming or windowing within the photograph. This makes it possible to simulate the output of a bellows camera by selecting a camera position that produces the desired perspective and then windowing to the desired portion of the image plane.
If the camera position has never been set, the camera information is invalidated by initializing the focal length to -1. If a negative focal length is encountered when a camera view is updated, a camera position centered in the view with the image plane centered between the front and back clipping planes is calculated automatically. When the FIT command is executed, the current camera position is invalidated by negating the focal length and the update automatically re-centers the camera.
The camera viewing volume does not coincide with orthographic viewing volume. The viewing area coincides at the image plane only, with the camera viewing area smaller than the orthographic view area at depths in front of the image plane and larger at depths beyond the image plane.
The camera lens angle is stored for each view, but is not necessary for the camera specification and is never used during an update. The angle is used for automatically calculating the focal length from the view extents when a camera view is first updated or the SET CAMERA command is executed.
Returns
SUCCESS if the requested information is valid, MDLERR_BADVIEWNUMBER if viewNumber is invalid, and MDLERR_VIEWNOTDISPLAYED if the view is not displayed.
Remarks
Required Library: mdlbltin.lib
int mdlView_getCameraParameters ( Dpoint3d positionP,
Dpoint3d targetP,
Dpoint3d upVectorP,
double *  angleP,
DRange2dP  screenWindowP,
double *  frontClipDist,
double *  backClipDist,
int  view 
)

Get the camera parameters for a view.

If any of the parameters are not required, NULL may be specified for the parameter pointer.

Parameters
[out]positionPthe camera position.
[out]targetPthe target position.
[out]upVectorPis always perpendicular to the camera axis.
[out]anglePcamera field of view angle (in radians).
[out]screenWindowPportion of the image plane that is displayed.
[out]frontClipDistdistance from the camera to the front of the clipping plane
[out]backClipDistdistance from the camera to the back of the clipping plane
[in]viewview number
Returns
SUCCESS if the view is successfully defined.
Remarks
The camera direction is always from positionP towards targetP, which coincides with the negative Z-Axis for the view. MicroStation's image plane is always coincident with the camera target. Therefore, the target appears the same size in a camera (perspective) or non-camera (orthographic) view.
The view rotation about the camera axis is determined by upVectorP. This is a normalized direction vector that defines the y-axis for the view.
The camera angle can be derived from the maximum of the view width and height and the distance from the camera to the target in the following manner: cameraAngle = 2 * arctan(maxDimension/(2*targetDistance));
The screen window coordinates are defined in an image plane coordinate system with an origin at the camera target. For a centered view, the screen window coordinates will be (-width/2, -height/2) (width/2, height/2). This corresponds the design of most modern cameras as the viewing direction is perpendicular to the camera plane. In an uncentered window, the image plane is tilted in relation to the viewing direction. This corresponds to a view, or bellows camera.
See also
mdlView_setCameraParameters
Remarks
Required Library: mdlbltin.lib
StatusInt mdlView_getClipBoundaryElement ( DgnPlatform::ElementId *  pElementId,
int  viewIndex 
)

Get the view's clip volume.

Parameters
[out]pElementIdthe element ID of the clip volume
[in]viewIndexthe index of the view
Returns
SUCCESS if the view had a clip volume set
Remarks
Required Library: mdlbltin.lib
StatusInt mdlView_getClipMaskElement ( DgnPlatform::ElementId *  pElementId,
int  viewIndex 
)

Get the view's clip volume.

Parameters
[out]pElementIdthe element ID of the clip mask
[in]viewIndexthe index of the view
Returns
SUCCESS if the view had a clip volume set
Remarks
Required Library: mdlbltin.lib
void mdlView_getDefaultFlags ( DgnPlatform::ViewFlags *  viewFlagsP)

Set the flags in the given DgnPlatform::ViewFlags structure to their default setting.

Parameters
[out]viewFlagsPa DgnPlatform::ViewFlags structure in which the flags will be set to their default setting.
See also
mdlView_getFlags mdlView_setFlags
Remarks
Required Library: mdlbltin.lib
int mdlView_getDisplayControl ( int  paramNum,
int  viewNum 
)

Get view display control attributes.

Parameters
[in]paramNumspecifies the view attribute is get. Any of the VIEWCONTROL_ values in mdl.h
[in]viewNumspecifies the view.
Returns
The value of the parameter specified by paramNum or false if paramNum or viewNum are invalid. Use mdlView_isValidIndex to test the view index. Valid paramNum values are in the range [0..MAX_VIEWCONTROL].
See also
mdlView_setDisplayControl
Remarks
Required Library: mdlbltin.lib
StatusInt mdlView_getFlags ( DgnPlatform::ViewFlags *  viewFlags,
int  viewIndex 
)

Get the view settings flags for a view.

Parameters
[out]viewFlagsa copy of the DgnPlatform::ViewFlags structure for the indicated view.
[in]viewIndexthe view number for which the flags information is retrieved.
Returns
SUCCESS if the information is retireved successfully, otherwise ERROR.
See also
mdlView_setFlags
Remarks
Required Library: mdlbltin.lib
StatusInt mdlView_getHomogeneousMaps ( DPoint4d worldEye,
DPoint4d viewEye,
DMap4d worldToViewMap,
DMap4d worldToNPCMap,
DMatrix4d worldToFocalPlane,
DMatrix4d viewToFocalPlane,
double *  focalLength,
double *  nPCFocalPlaneDepth,
int  viewNumber 
)

Retrieve various homogeneous maps for a MicroStation view transform.

Any combination of the return parameters may be NULL.

Parameters
[out]worldEyethe eyepoint as a homogeneous point in world coordinates, i.e. 0 weight if flat view.
[out]viewEyethe eyepoint as a homogeneous point in the view frame.
[out]worldToViewMapan invertible map from world coordinates to the local frame on the view plane.
[out]worldToNPCMapan invertible map from world coordinates to the 01 cube of the view.
[out]worldToFocalPlanea (singular) matrix which collapses geometry from world coordinates to the focal plane.
[out]viewToFocalPlanea (singular) matrix which collapses geometry in the viewplane coordinate frame onto the view plane.
[out]focalLengththe focal length. Its value is 0 if the view is flat.
[out]nPCFocalPlaneDepththe depth of the focal plane within the NPC box.
[in]viewNumberview the information is retrieved from.
Returns
SUCCESS if the operation is completed successfully, otherwise ERROR.
Remarks
Required Library: mdlbltin.lib
int mdlView_getLevelDisplay ( bool *  viewLevelDisplay,
DgnModelRefP  modelRef,
int  iViewNum,
DgnPlatform::LevelId  iLevelId,
DgnPlatform::ViewLevelDisplayType  levelDisplayType 
)

Determine whether a level is displayed in a view.

Parameters
[out]viewLevelDisplaytrue if the level display is on for the given level in the given view, otherwise false.
[in]modelRefthe model containing the level.
[in]iViewNumthe view number.
[in]iLevelIdthe id of the level in question.
[in]levelDisplayTypeone of VIEW_LEVEL_DISPLAY_TYPE_... (defined in msdefs.h)
Returns
SUCCESS if the operation completed successfully, otherwise ERROR.
Remarks
Refer to mdlView_getLevelDisplayMask to get more details on "levelDisplayType".
Required Library: mdlbltin.lib
See also
mdlView_setLevelDisplayMask mdlView_getLevelDisplayMask mdlView_setLevelDisplay mdlView_changeLevelDisplay mdlView_setLevelDisplayMaskMulti mdlView_changeLevelDisplayMaskMulti
BitMaskCP mdlView_getLevelDisplayMask ( DgnModelRefP  modelRef,
int  iViewNum,
DgnPlatform::ViewLevelDisplayType  levelDisplayType 
)

Get the level-mask for a model and view number.

The level-mask is returned in the form of a bit-mask. It represents if a level is ON/OFF in the specified view.

Parameters
[in]modelRefmodel
[in]iViewNumview number
[in]levelDisplayTypeone of VIEW_LEVEL_DISPLAY_TYPE_... (defined in msdefs.h)
Returns
The display mask as a BitMask. Returns NULL if pModelRef or view number is invalid.
Remarks
The value of "levelDisplayType" can be one of ViewLevelDisplayType::Normal or ViewLevelDisplayType::Effective. ViewLevelDisplayType::Normal refers to the level-display associated with an individual view. This value can be either ON or OFF. If this value is OFF, then elements on the level will not be visible in the view. If this value is ON, then elements on the level may be visible in the view, depending on the state of the global-display and global-freeze flags for the level. Each level has a "global-display" and "global-freeze" flag. Refer to the documentation of level-attributes for more information on this. In summary, a level is visible in a view, if it is turned ON in the view, if its global-display flag is ON and its global-freeze flag is OFF. This effective state of a level is returned if "levelDisplayType" is set to ViewLevelDisplayType::Effective.
The bit-mask is 1 based. For example to get the display flag for a level with the function mdlBitMask_testBit, your call should look like: mdlBitMask_testBit(pLevelDisplayBitMask, levelid -1)
Note the "const"ness of the returned bit-mask. It is important not to cast into a non-const bit-mask. This bit-mask should not be changed.
See also
mdlView_setLevelDisplayMask mdlView_getLevelDisplay mdlView_setLevelDisplay mdlView_changeLevelDisplay mdlView_setLevelDisplayMaskMulti mdlView_changeLevelDisplayMaskMulti
Remarks
Required Library: mdlbltin.lib
int mdlView_getLevels ( short *  v7LevelMask,
int  iViewNumIn 
)

Get information about the levels that are on for the master design file for a view.

Parameters
[out]v7LevelMaskAn array of short integers with one bit for each level and dimensioned to 4. The lowest bit of v7LevelMask[0] is set to 1 if level 1 is on in the given view and to 0 if level 1 is off. Similarly, bit 1 of v7LevelMask[0] is set to the state of level 2. The highest bit (15) of v7LevelMask[3] represents the state of the special level reserved for cell headers. This bit is always on.
[in]iViewNumInview to get information from
Returns
SUCCESS if the level information for the specified view is successfully retrieved, MDLERR_BADVIEWNUMBER if viewNumber is invalid, and MDLERR_VIEWNOTDISPLAYED if the view is not currently displayed.
Remarks
Required Library: mdlbltin.lib
int mdlView_getMaxCount ( )

Get the maximum number of views that can be opened by MicroStation.

Returns
Maximum number of allowable views.
See also
mdlView_isValidIndex
Remarks
Required Library: mdlbltin.lib
int mdlView_getParameters ( Dpoint3d origin,
Dpoint3d center,
Dpoint3d delta,
RotMatrixP  rMatrix,
double *  activeZ,
int  view 
)

Get the view settings for a view.

All settings other than viewNumber are returned in the current coordinate system. If any settings are NULL, MicroStation does not fill them in.

Parameters
[out]origina Dpoint3d to receive the view's origin. The view origin is the point on the back clipping plane's lower left corner.
[out]centera Dpoint3d to receive the view's center, which is the center of the volume contained by the front and back clipping planes.
[out]deltaa Dpoint3d to receive the size of the view in the view's X, Y and Z directions.
[out]rMatrixa RotMatrix to receive the view's rotation matrix.
[out]activeZa double to receive the active depth. Active depth is defined as the positive distance from the back clipping plane to the active depth plane.
[in]viewview number of interest.
Returns
SUCCESS if the information requested is valid. MDLERR_BADVIEWNUMBER is returned if viewNumber is invalid (not in the range 0-7). MDLERR_VIEWNOTDISPLAYED if viewNumber is valid, but the view is not currently displayed.
Remarks
Required Library: mdlbltin.lib
int mdlView_getParametersWithExpandedDepth ( Dpoint3d origin,
Dpoint3d center,
Dpoint3d delta,
RotMatrixP  rMatrix,
double *  activeZ,
int  view,
bool  expandDepth 
)

Identical to mdlView_getParameters, excep that it has an additional argument that will optionally expand the depth for a 3D view with front or back clipping turned off to encompass all of the geometry in the view.

All settings other than viewNumber are returned in the current coordinate system. If any settings are NULL, MicroStation does not fill them in.

Parameters
[out]origina Dpoint3d to receive the view's origin. The view origin is the point on the back clipping plane's lower left corner.
[out]centera Dpoint3d to receive the view's center, which is the center of the volume contained by the front and back clipping planes.
[out]deltaa Dpoint3d to receive the size of the view in the view's X, Y and Z directions.
[out]rMatrixa RotMatrix to receive the view's rotation matrix.
[out]activeZa double to receive the active depth. Active depth is defined as the positive distance from the back clipping plane to the active depth plane.
[in]viewview number of interest.
[in]expandDepthif true and the the front and back clipping is disabled, then the origin and delta are expanded to include the geometry.
Returns
SUCCESS if the information requested is valid. MDLERR_BADVIEWNUMBER is returned if viewNumber is invalid (not in the range 0-7). MDLERR_VIEWNOTDISPLAYED if viewNumber is valid, but the view is not currently displayed.
Remarks
Required Library: mdlbltin.lib
DgnModelRefP mdlView_getRootModel ( int  viewIndex)

Get the DgnModelRefP of the root model that is currently displayed in a specific view.

Parameters
[in]viewIndexthe view number for which the model number is returned.
Returns
the DgnModelRefP of the root model for this view. NULL if the view is invalid or not displayed.
See also
mdlView_setModel
Remarks
Required Library: mdlbltin.lib
void mdlView_getStandard ( RotMatrixP  rMatrixP,
DgnPlatform::StandardView  stdViewNum 
)

Get one of the standard rotation matrices.

Parameters
[out]rMatrixProtation matrix for given view
[in]stdViewNumstandard view number. Possible values are defined in msdefs.h. For example, StandardView::Top, StandardView::Bottom, etc.
See also
mdlView_getStandard2 mdlView_isStandard mdlView_isStandard2
Remarks
Required Library: mdlbltin.lib
StatusInt mdlView_getStandard2 ( RotMatrixP  rMatrixP,
DgnPlatform::StandardView  stdViewNum,
DgnModelRefP  modelRef 
)

Get one of the standard rotation matrices, relative to the active coordinate system of the specified model.

Parameters
[out]rMatrixProtation matrix for given view
[in]stdViewNumstandard view number. Possible values are defined in msdefs.h. For example, StandardView::Top, StandardView::Bottom, etc.
modelRefin model from which to get the ACS
Returns
SUCCESS if the matrix is acquired and ERROR otherwise.
See also
mdlView_getStandard mdlView_isStandard mdlView_isStandard2
Remarks
Required Library: mdlbltin.lib
int mdlView_getStandardCameraLens ( double *  angle,
double *  focalLength,
int  lensNumber 
)

Return the camera angle and focal length for the standard camera lenses supported by MicroStation.

The standard lens is specified by lensNumber in the following manner:

0 20 FishEye
1 28 ExtraWide
2 35 Wide
3 50 Normal
5 200 Telephoto
6 1000 Telescopic
Parameters
[out]anglelens angle in radians.
[out]focalLengthfocal length of lens (mm).
[in]lensNumberstandard lens number.
Returns
SUCCESS if a valid lensNumber is specified and ERROR otherwise.
See also
mdlView_setCameraLens mdlView_getCamera
Remarks
Required Library: mdlbltin.lib
RscId mdlView_getToolBoxId ( int  viewIndex,
int  toolBoxIndex,
bool  b3D 
)

Get a id to the view toolbox by view index and toolbox index.

Parameters
[in]viewIndexthe index of the view
[in]toolBoxIndexthe index of the toolbox
[in]b3Dwhether to retrieve info about the 2D or 3D toolbox
Returns
id of the view toolbox.
Remarks
Required Library: mdlbltin.lib
WCharCP mdlView_getToolBoxName ( int  viewIndex,
int  toolBoxIndex,
bool  b3D 
)

Get a name to the view toolbox by view index and toolbox index.

Parameters
[in]viewIndexthe index of the view
[in]toolBoxIndexthe index of the toolbox
[in]b3Dwhether to retrieve info about the 2D or 3D toolbox
Returns
name of the view toolbox.
Remarks
Required Library: mdlbltin.lib
WCharCP mdlView_getToolBoxPath ( int  viewIndex,
int  toolBoxIndex,
bool  b3D 
)

Get a path to the view toolbox by view index and toolbox index.

Parameters
[in]viewIndexthe index of the view
[in]toolBoxIndexthe index of the toolbox
[in]b3Dwhether to retrieve info about the 2D or 3D toolbox
Returns
path of the view toolbox.
Remarks
Required Library: mdlbltin.lib
ViewportP mdlView_getViewport ( int  viewIndex)

Get an DgnPlatform::Viewport by view index.

Parameters
[in]viewIndexthe index of the view
Returns
IMSViewportP, or NULL if viewIndex not valid.
Remarks
Required Library: mdlbltin.lib
void mdlView_getViewRectangle ( BSIRect *  viewRectP,
MSWindow windowP,
DgnPlatform::DgnCoordSystem  coordSystem 
)

Get the screen area taken up by a view.

This does not include the area used for scrollbars and view control icons. Use mdlWindow_contentRectGetLocal to get the size of the entire view window.

Parameters
[out]viewRectPview rectangle.
[in]windowPview window. To get an MSWindow from a view number, use mdlWindow_viewWindowGet.
[in]coordSystemCurrently, the only valid argument is VIEW_GLOBALCOORDS.
See also
mdlWindow_contentRectGetLocal mdlWindow_viewWindowGet
Remarks
Required Library: mdlbltin.lib
bool mdlView_getViewToolsDisplay ( int  viewIndex)

Get whether the view toolboxes are displayed for a given view index.

Parameters
[in]viewIndexthe index of the view
Returns
true if the the view toolboxes are displayed.
Remarks
Required Library: mdlbltin.lib
int mdlView_indexFromWindow ( MSWindow window)

Get the view number from a pointer to the MSWindow of the view.

Parameters
[in]windowpointer to a view of type MSWindow.
Returns
view Number from 0 and DgnPlatform::MAX_VIEWS if window is an MSWindow pointer that points to a view window, and -1 otherwise.
See also
mdlWindow_viewWindowGet
Remarks
Required Library: mdlbltin.lib
bool mdlView_is3d ( int  viewNum)
Parameters
[in]viewNumview to test.
Returns
true if the view is active and its root model is 3d.
Remarks
Required Library: mdlbltin.lib
bool mdlView_isActive ( int  viewNumber)

Determine whether a view is "active" (turned on).

Parameters
[in]viewNumberview to check
Returns
true if the view is on. If viewNumber is invalid, this routime will return false.
Remarks
Required Library: mdlbltin.lib
bool mdlView_isModelActive ( int  viewIndex)

Determine whether the model displayed in the specified view window is the currently active model.

Parameters
[in]viewIndexthe view number for which the displayed model is found and tested against the currently active model.
Returns
true if the model is active model.
See also
mdlView_setModel
Remarks
Required Library: mdlbltin.lib
DgnPlatform::StandardView mdlView_isStandard ( RotMatrixCP  trans)

Determine whether a rotation matrix matches a standard view rotation matrix.

This function helps identify whether a view is currently displaying a standard view.

Parameters
[in]transrotation matrix to test
Returns
The standard view number defined in msdefs.h or -1 if trans does not match a standard view.
See also
mdlView_getStandard
Remarks
Required Library: mdlbltin.lib
bool mdlView_isValidIndex ( int  index)

Test whether a value is a valid view index value.

Parameters
[in]indexthe index value to test for validity as a view index.
Returns
true if the value is a valid view index, false otherwise.
See also
mdlView_getMaxCount
Remarks
Required Library: mdlbltin.lib
int mdlView_isVisible ( int  viewNumber)

Determine whether a view is visible.

Views will always be "visible" if they are turned on, so this function and mdlView_isActive will always return the same value. The distinction is historical, and they are both maintained for compatibility.

Parameters
[in]viewNumberview to check
Returns
true if the view is on. If viewNumber is invalid, this routime will return false.
Remarks
Required Library: mdlbltin.lib
int mdlView_newWindowCenter ( int  viewNumber,
DPoint3dCP  newCenterP 
)

Set a new window center without changing the orientation or scale of the view.

Parameters
[in]viewNumberview for which the new view center is to be applied.
[in]newCenterPnew view center (in current coordinate system).
Returns
SUCCESS if the input parameters are valid, MDLERR_BADVIEWNUMBER if viewIndex is not between 0 and DgnPlatform::MAX_VIEWS, or MDLERR_VIEWNOTDISPLAYED if the view is not currently displayed.
See also
mdlView_setArea mdlView_zoom mdlView_rotateToRMatrix
Remarks
Required Library: mdlbltin.lib
void mdlView_pan ( Point2d const *  distance,
int  viewNumber,
bool  doUpdate 
)

Move a view by a specified number of pixels, relative to it's current location.

Parameters
[in]distancedistance to pan, in pixels.
[in]viewNumberview to pan
[in]doUpdateif true, update the view after pan.
Remarks
Required Library: mdlbltin.lib
int mdlView_pointToScreen ( Point2dP  screenPointP,
DPoint3dCP  uorPointP,
int  viewNumber,
DgnPlatform::DgnCoordSystem  coordinateSystem 
)

Calculate a screen position for an input point.

Parameters
[out]screenPointPa Point2d structure that will hold the output point on return from the function. (Note: The point returned may be outside the range that can be displayed in the indicated view, depending on the input point and the area visible in the view.)
[in]uorPointPthe point (in the current coordinate system) for which screen coordinates are desired.
[in]viewNumberview for screenPointP
[in]coordinateSystemmust be set to either DgnCoordSystem::Screen (local) or DgnCoordSystem::View (global). If DgnCoordSystem::View, screenPointP is relative to the upper left corner of the window, and if DgnCoordSystem::Screen, screenPointP is relative to the upper left corner of the screen. In both cases x increases to the right and y increases down the window.
Returns
SUCCESS if the input parameters are valid, MDLERR_BADVIEWNUMBER if viewIndex is not between 0 and DgnPlatform::MAX_VIEWS, or MDLERR_VIEWNOTDISPLAYED if the view is not currently displayed.
See also
mdlView_screenToPoint
Remarks
Required Library: mdlbltin.lib
int mdlView_queuePartialUpdate ( int  viewNumber,
BSIRect *  rectsP,
int  numRects 
)

Update one or more subparts of a MicroStation view.

Parameters
[in]viewNumberview for which portions are to be updated.
[in]rectsParray of rectangles for which updates are to be performed. They must be in global coordinates (i.e., relative to the upper left of the screen).
[in]numRectsthe number of rectangles in the rectsP array. The maximum number of rectangles is 15.
Remarks
If the application wants the updates to happen immediately, the
mdlWindow_windowEventsProcessAll should be called following mdlView_queuePartialUpdate.
Returns
SUCCESS if the input parameters are valid, MDLERR_BADVIEWNUMBER if viewIndex is not between 0 and DgnPlatform::MAX_VIEWS, or MDLERR_VIEWNOTDISPLAYED if the view is not currently displayed.
See also
mdlView_updateSingle mdlView_updateMulti mdlView_updateMultiExtended
Remarks
Required Library: mdlbltin.lib
void mdlView_reloadToolBoxes ( int  viewIndex)

Reload the toolboxes for a given view based on view index.

Parameters
[in]viewIndexthe index of the view
Remarks
Required Library: mdlbltin.lib
int mdlView_reopen ( int  viewNumber)

Close and reopen the view specified by viewNumber.

This function is equivalent to calling mdlView_turnOff followed by mdlView_turnOn, except that the stacking order of views maintained.

Parameters
[in]viewNumberview to reopen
Returns
SUCCESS or MDLERR_BADVIEWNUMBER if viewNumber is invalid.
Remarks
Required Library: mdlbltin.lib
int mdlView_rotateToRMatrix ( RotMatrixP  rMatrix,
int  view 
)

Rotate a view to the rotation matrix given by rMatrix.

Parameters
[in]rMatrixrotation matrix
[in]viewview to rotate
Remarks
The view is rotated around its center point and the view extents are unchanged.
After mdlView_rotateToRMatrix is called, the view needs to be updated with mdlView_updateSingle so the changed view extents can be seen.
Returns
SUCCESS if the view is changed, MDLERR_BADVIEWNUMBER if viewNumber is invalid, and MDLERR_VIEWNOTDISPLAYED if the view is not currently displayed.
See also
mdlView_updateSingle
Remarks
Required Library: mdlbltin.lib
StatusInt mdlView_saveNamed ( WCharCP  viewNameP,
WCharCP  descriptionP,
WCharCP  viewNameSpace,
int  view 
)

Save the current settings for one of the view windows to a named view element using the given name and description.

Parameters
[in]viewNamePthe name to be given to the named view element when it is saved.
[in]descriptionPthe description to be given to the named view element when it is saved.
[in]viewNameSpacethe name space of the named view element. Using NULL will make this named view available to management by the end user via the save views application. Using a non-null value has the effect of making it a protected named view, which is only accessed by the API.
[in]viewthe view number to be saved as a named view element.
Returns
SUCCESS if the view element is saved successfully, otherwise MDLERR_BADARG if the view argument is not a valid view number.
See also
mdlView_saveNamedViewElement
Remarks
Required Library: mdlbltin.lib
int mdlView_screenToPoint ( DPoint3dP  uorPointP,
Point2d *  screenPointP,
int  viewNumber,
DgnPlatform::DgnCoordSystem  coordSystem 
)

Calculates the world coordinates given a point on the screen.

The output is in the current coordinate system.

Parameters
[out]uorPointPoutput point (in the current coordinate system)
[in]screenPointPpoint for in screen coordinates
[in]viewNumberview for screenPointP
[in]coordSystemeither DgnCoordSystem::View or DgnCoordSystem::Screen. If DgnCoordSystem::View, screenPointP is relative to the upper left corner of the window, with x increasing to the right and y increasing down the window. If VIEW_INGLOBALCOORDS, screenPointP is relative to the upper left corner of the screen.
Returns
SUCCESS if the input parameters are valid, MDLERR_BADVIEWNUMBER if viewIndex is not between 0 and DgnPlatform::MAX_VIEWS, or MDLERR_VIEWNOTDISPLAYED if the view is not currently displayed.
See also
mdlView_pointToScreen
Remarks
Required Library: mdlbltin.lib
int mdlView_setActiveDepth ( int  viewNumber,
double  depth 
)

Change the active depth for a view.

The parameters are given in the current coordinate system.

Parameters
[in]viewNumberview to set active depth
[in]depthactive depth distance. This value is a distance from the back clipping plane. It must be greater than zero and less than the current display depth.
Returns
SUCCESS if the active depth plane is changed, MDLERR_BADVIEWNUMBER if viewNumber is invalid, and MDLERR_VIEWNOTDISPLAYED if the view is not currently displayed.
See also
mdlView_setDisplayDepth mdlView_setActiveDepthPoint
Remarks
Required Library: mdlbltin.lib
int mdlView_setActiveDepthPoint ( int  viewNumber,
Dpoint3d points 
)

Change the active depth for a view using a point on the new active depth plane.

Parameters
[in]viewNumberview to set active depth
[in]pointspoint on active depth plane.
Returns
SUCCESS if the active depth plane is changed, MDLERR_BADVIEWNUMBER if viewNumber is invalid, and MDLERR_VIEWNOTDISPLAYED if the view is not currently displayed.
See also
mdlView_setDisplayDepthmdl mdlView_setActiveDepth
Remarks
Required Library: mdlbltin.lib
int mdlView_setArea ( int  viewNumber,
Dpoint3d const *  pt,
Dpoint3d const *  zOrg,
double  zDelta,
double  actZdepth,
RotMatrixCP  rotMatrix 
)

Set the viewing area for a view.

All parameters are in the current coordinate system.

Parameters
[in]viewNumberthe view number to change.
[in]ptan array of two points that, combined with the rotation matrix rMatrix, define the viewing rectangle. MicroStation adjusts the rectangle to match the view's actual aspect ratio.
[in]zOrga point that lies on the view's back clipping plane. If zOrigin is NULL, MicroStation uses (0, 0, 0) in the current coordinate system.
[in]zDeltathe distance from the back clipping plane to the front clipping plane. zDelta must be greater than zero.
[in]actZdepththe distance from the back clipping plane to the view's active depth. actZDepth must be greater than zero and less than zDelta.
[in]rotMatrixthe view's rotation. If rMatrix is NULL, MicroStation uses the identity matrix (top view).
Remarks
After calling this function, you need to update the view to see the changed view extents using mdlView_updateSingle.
Returns
SUCCESS if the viewing area is set, MDLERR_BADVIEWNUMBER if viewNumber is invalid, and MDLERR_VIEWNOTDISPLAYED if the view is not currently displayed.
Remarks
Required Library: mdlbltin.lib
int mdlView_setCameraLens ( double  angle,
int  view 
)

Set the camera lens angle for a view.

Parameters
[in]anglelens angle in radians.
[in]viewview number.
Returns
SUCCESS if the lens angle is set successfully and an appropriate error status otherwise.
See also
mdlView_getStandardCameraLens mdlView_getCamera
Remarks
Required Library: mdlbltin.lib
int mdlView_setCameraParameters ( Dpoint3d positionP,
Dpoint3d targetP,
Dpoint3d upVectorP,
double *  angleP,
double *  aspectRatioP,
DRange2dP  screenWindowP,
double *  frontClipDist,
double *  backClipDist,
int  view 
)

Set the camera parameters for a view.

Since the camera parameters are not independent, it is possible to omit many of the camera parameter arguments. If NULL is passed for an argument, it is defaulted to the existing value or calculated from the other parameters as described below.

Parameters
[in]positionPthe position of the camera.
[in]targetPthe point at which the camera is aimed
[in]upVectorPa vector that sets the y-axis for the camera view
[in]anglePthe camera field of view angle. The camera angle can be derived from the maximum of the view width and height and the distance from the camera to the image plane. If NULL is passed, the camera angle is unchanged.
[in]aspectRatioPthe view aspect ratio. This represents the view height divided by the view width. If NULL is passed, the aspect ratio of the view window is used.
[in]screenWindowPdefines the portion of the image plane that is displayed. The screen window coordinates are defined in an image plane coordinate system with an origin at the camera target. For a centered view, the screen window coordinates will be (-width/2, -height/2) (width/2, height/2). This corresponds the design of most modern cameras as the viewing direction is perpendicular to the camera plane. In an uncentered window, the image plane is tilted in relation to the viewing direction. This corresponds to a view, or bellows camera. If NULL is passed a centered window is calculated with the size derived from the view angle and distance to the image plane.
[in]frontClipDistthe distance from the camera to the front clipping plane. If NULL is passed for frontClipDist, the front clipping distance is arbitrarily set to the target distance divided by 300.
[in]backClipDistThe distance from the camera to the back clipping plane. If NULL is passed for backClipDist, the back clipping distance is set to the ten times the target distance.
[in]viewthe index of the view for which the camera is being set.
Returns
mdlView_setCameraParameters returns SUCCESS if the view is successfully defined.
Remarks
The camera position is specified by positionP, the camera target is specified by targetP. If NULL is passed for either of these parameters, the camera position or target is unchanged. The camera direction is always from positionP towards targetP, this coincides with the negative Z-Axis for the view. MicroStation's image plane is always coincident with the camera target, therefore, the target appears the same size in a camera (perspective) or non-camera (orthographic) view.
The view rotation about the camera axis is determined by upVectorP, this is a normalized direction vector that defines the y-axis for the view. It is always perpendicular to the camera axis. If NULL is passed for upVectorP, the camera will be oriented such that the camera horizontal is parallel to the view X-Y plane.
The camera field of view angle (in radians) is specified by angleP. If NULL is passed, the camera angle is unchanged. The camera angle can be derived from the maximum of the view width and height and the distance from the camera to the target in the following manner: cameraAngle = 2 * arctan(maxDimension/(2*targetDistance));
See also
mdlView_setCameraParameters
Remarks
Required Library: mdlbltin.lib
StatusInt mdlView_setClipBoundaryElement ( int  viewIndex,
DgnPlatform::ElementId  elementID 
)

Set the view's clip volume.

Parameters
[in]viewIndexthe index of the view
[in]elementIDthe element ID of the clip volume, use 0 to clear the clip volume
Remarks
The referenced element must exist in the active model.
It must be possible to extract/generate a single, closed clip volume from the element, otherwise setting the clip volume will fail.
Valid elements include: closed curves, shapes, group holes, simple solids/surfaces, and cylinders.
Returns
SUCCESS if the clip volume was set
Remarks
Required Library: mdlbltin.lib
StatusInt mdlView_setClipMaskElement ( int  viewIndex,
DgnPlatform::ElementId  elementID 
)

Set the view's clip mask.

Parameters
[in]viewIndexthe index of the view
[in]elementIDthe element ID of the clip volume, use 0 to clear the clip volume
Remarks
The referenced element must exist in the active model.
It must be possible to extract/generate a single, closed clip mask from the element, otherwise setting the clip mask will fail.
Valid elements include: closed curves, shapes, group holes, simple solids/surfaces, and cylinders.
Returns
SUCCESS if the clip mask was set
Remarks
Required Library: mdlbltin.lib
int mdlView_setDisplayControl ( int  paramNum,
int  viewNum,
int  value 
)

Set view display control attributes.

Parameters
[in]paramNumnumber of attribute to set. Any of the VIEWCONTROL_ values in mdl.h
[in]viewNumview number
[in]valuenew value to set view attribute to.
Returns
MDLERR_BADVIEWNUMBER if viewNum is invalid, MDLERR_BADARG for invalid paramNum, ERROR for general failure, or SUCCESS if operation completes. Use mdlView_isValidIndex to test the view index. Valid paramNum values are in the range [0..MAX_VIEWCONTROL].
See also
mdlView_getDisplayControl
Remarks
Required Library: mdlbltin.lib
int mdlView_setDisplayDepth ( int  viewNumber,
double  frontDepth,
double  backDepth 
)

Change the front and back clipping planes for a view.

All parameters are given in the current coordinate system.

Parameters
[in]viewNumberview to set display depth.
[in]frontDepthfront display depth
[in]backDepthback display depth
Remarks
frontDepth and backDepth to define the positions of the front and back clipping planes. These values are signed distances from the current front clipping plane.
After this function is called, the view needs to be updated with mdlView_updateSingle, so the changed clipping planes can be seen.
Returns
SUCCESS if the view clipping planes are changed, MDLERR_BADVIEWNUMBER if viewNumber is invalid, and MDLERR_VIEWNOTDISPLAYED if the view is not currently displayed.
See also
mdlView_updateSingle
mdlView_setDisplayDepthPoints
Remarks
Required Library: mdlbltin.lib
int mdlView_setDisplayDepthPoints ( int  viewNumber,
Dpoint3d points 
)

Change the front and back clipping planes for a view using two points.

Parameters
[in]viewNumberthe index of the view being changed.
[in]pointsan array of two points that define the clipping planes.
Remarks
After this function is called, the view needs to be updated with mdlView_updateSingle, so the changed clipping planes can be seen.
Returns
SUCCESS if the view clipping planes are changed, MDLERR_BADVIEWNUMBER if viewNumber is invalid, and MDLERR_VIEWNOTDISPLAYED if the view is not currently displayed.
See also
mdlView_updateSingle
mdlView_setDisplayDepth
Remarks
Required Library: mdlbltin.lib
StatusInt mdlView_setFlags ( DgnPlatform::ViewFlags *  viewFlags,
int  viewIndex 
)

Set the view settings flags for a view.

Parameters
[in]viewFlagsthe DgnPlatform::ViewFlags structure holding the view flags information from which the indicated view's settings will be updated.
[in]viewIndexthe view number indicating the view to set.
Returns
SUCCESS if the flags on the indicated view are set, otherwise ERROR.
See also
mdlView_getFlags
Remarks
Required Library: mdlbltin.lib
int mdlView_setLevelDisplay ( DgnModelRefP  modelRef,
int  iViewNum,
DgnPlatform::LevelId  iLevelId,
bool  levelDisplay 
)

Set the display of a level in a view.

Parameters
[in]modelRefthe model containing the level.
[in]iViewNumthe view number.
[in]iLevelIdthe id of the level.
[in]levelDisplaytrue if level display is to be turned on, otherwise false.
Returns
SUCCESS if the level flag was set successfully, otherwise ERROR.
See also
mdlView_getLevelDisplay
Remarks
Required Library: mdlbltin.lib
See also
mdlView_setLevelDisplayMask mdlView_getLevelDisplayMask mdlView_getLevelDisplay mdlView_changeLevelDisplay mdlView_setLevelDisplayMaskMulti mdlView_changeLevelDisplayMaskMulti
int mdlView_setLevelDisplayMask ( DgnModelRefP  modelRef,
int  iViewNum,
BitMaskCP  pViewLevelMask,
bool  doUpdate 
)

Set the level display mask for the specified model and view.

The level display mask is specified in the form of a bit-mask. An ON value indicates that the corresponding level is to be turned on in the view. An OFF value indicates that the corresponding level is to be turned off in the view. Even if the bit-value is ON, that is no guarentee that elements on the level will be displayed. Refer to discussion in function mdlView_getLevelDisplayMask for more details.

Parameters
[in]modelRefmodel
[in]iViewNumview number
[in]pViewLevelMaskthe view level bit-mask to be set.
[in]doUpdateif ON, then redraw the view
Returns
SUCCESS if the operation is completed successfully, otherwise ERROR.
Remarks
The bit-mask is 1 based. For example to set the display flag for a level with the function mdlBitMask_setBit, your call should look like: mdlBitMask_setBit(pLevelDisplayBitMask, levelid -1)
See also
mdlView_getLevelDisplayMask mdlView_getLevelDisplay mdlView_setLevelDisplay mdlView_changeLevelDisplay mdlView_setLevelDisplayMaskMulti mdlView_changeLevelDisplayMaskMulti
Remarks
Required Library: mdlbltin.lib
int mdlView_setLevelDisplayMaskMulti ( DgnModelRefP  modelRef,
bool *  viewList,
BitMaskCP  viewLevelMask,
bool  doUpdate 
)

Set the level mask for multiple views from the given level mask.

This function works similar to mdlView_setLevelDisplayMask, except that it applies the specified level-mask to the list of specified views.

Parameters
[in]modelRefmodel
[in]viewListan array of DgnPlatform::MAX_VIEWS bool, each representing a view. A non-zero value indicates that view is to be updated from the BitMask given by pViewLevelMask.
[in]viewLevelMaskview level bit-mask to set.
[in]doUpdateIF ON, then redraw the views.
Returns
SUCCESS if the operation is completed successfully, otherwise ERROR.
See also
mdlView_setLevelDisplayMask mdlView_getLevelDisplayMask mdlView_getLevelDisplay mdlView_setLevelDisplay mdlView_changeLevelDisplay mdlView_changeLevelDisplayMaskMulti
Remarks
Required Library: mdlbltin.lib
StatusInt mdlView_setModel ( DgnModelRefP  modelRef,
int  viewIndex 
)

Set the given view's model ID.

Parameters
[in]modelRefmodel ref to apply
[in]viewIndexindex of view
Returns
SUCCESS if the model is found, ERROR otherwise.
Remarks
Required Library: mdlbltin.lib
DItem_PulldownMenu* mdlView_setPopupMenu ( UInt32  menuType,
long  menuId,
MdlDesc ownerMD 
)

Set the menu that pops up when the user presses <shift-reset> inside a MicroStation view.

The view popup can be used for quick access to command-specific options or parameters. The view popup is automatically reset to the default MicroStation popup whenever mdlState_startPrimitive is called.

Parameters
[in]menuTypethe resource type for the menu. If menuType is 0 it defaults to RTYPE_PulldownMenu.
[in]menuIdthe resource ID for the popup menu.
[in]ownerMDMDL taskid of the owner of the menu. This parameter is usually NULL, meaning the the current task.
Returns
A pointer to the installed popup menu, or NULL if it fails to find the desired menu.
See also
mdlState_startPrimitiveAndSetPopupMenu
Remarks
Required Library: mdlbltin.lib
void mdlView_setToolBoxId ( int  viewIndex,
int  toolBoxIndex,
bool  b3D,
RscId  toolBoxId 
)

Set the view toolbox based on id by view index and toolbox index.

Parameters
[in]viewIndexthe index of the view
[in]toolBoxIndexthe index of the toolbox
[in]b3Dwhether to set info about the 2D or 3D toolbox
[in]toolBoxIdthe id of the toolbox
Remarks
Required Library: mdlbltin.lib
void mdlView_setToolBoxName ( int  viewIndex,
int  toolBoxIndex,
bool  b3D,
WCharCP  pToolBoxName 
)

Set the view toolbox based on name by view index and toolbox index.

Parameters
[in]viewIndexthe index of the view
[in]toolBoxIndexthe index of the toolbox
[in]b3Dwhether to set info about the 2D or 3D toolbox
[in]pToolBoxNamethe name of the toolbox
Remarks
Required Library: mdlbltin.lib
void mdlView_setToolBoxPath ( int  viewIndex,
int  toolBoxIndex,
bool  b3D,
WCharCP  pToolBoxPath 
)

Set the view toolbox based on path by view index and toolbox index.

Parameters
[in]viewIndexthe index of the view
[in]toolBoxIndexthe index of the toolbox
[in]b3Dwhether to set info about the 2D or 3D toolbox
[in]pToolBoxPaththe path of the toolbox
Remarks
Required Library: mdlbltin.lib
void mdlView_setUpApplyOpts ( Bentley::DgnPlatform::ApplyViewOptions applyOptsP,
int  type 
)

Set initial values for viewport info options.

Parameters
[in]applyOptsPthe ApplyViewOptions structure in which the value is set
[in]typethe type of the value to set (see view.h for VIEW_APPLY_OPTS_* constants that can be used in this function)
Remarks
Required Library: mdlbltin.lib
void mdlView_setViewToolsDisplay ( int  viewIndex,
bool  display 
)

Set whether the view toolboxes are displayed for a given view index.

Remarks
This overrides userPrefsP->flags.viewToolsDisplay on a per view basis.
Parameters
[in]viewIndexthe index of the view
[in]displayindicates whether the view toolboxes should display
Remarks
Required Library: mdlbltin.lib
void mdlView_synchWithTCB ( int  viewNumber)

Synchronizes the private view information that MicroStation maintains separately for each view with the "public" view information that is maintained in the TCB.

The reason that the private information is separated from the TCB information is that the private information reflects what is currently drawn on the screen. Elements will be undrawn in the same mode in which they were originally drawn, regardless of the current drawing mode.

For example, suppose that the state of the Fast Text Display is on when an element is originally drawn, and the user subsequently turns Fast Text Display off for a particular view and does not immediately update. Those text elements will be undrawn in Fast display mode until the next update. An application can override this normal behavior using mdlView_synchWithTCB. This allows an application to specify a draw mode in the TCB, and force MicroStation to immediately adopt this draw mode for the given view.

Parameters
[in]viewNumberview to synchronize with the TCB.
Remarks
Required Library: mdlbltin.lib
bool mdlView_treatAs3D ( int  viewIndex)

Determine whether the specified view should be treated as 3D.

Parameters
[in]viewIndexthe index of the view to query
Returns
true if the given view is 3D, false otherwise
Remarks
Required Library: mdlbltin.lib
int mdlView_turnOff ( int  viewNumber)

Turn off a MicroStation view.

Parameters
[in]viewNumberview to turn off
Returns
The mdlView_turnOff function returns SUCCESS if the view is turned off, MDLERR_BADVIEWNUMBER if viewNumber is invalid, and MDLERR_VIEWNOTDISPLAYED if the view is not currently displayed.
Remarks
Required Library: mdlbltin.lib
See also
mdlView_turnOn
int mdlView_turnOn ( int  viewNumber)

Turn on a MicroStation View using the current view parameters.

The function does not return until the view is initially painted.

Parameters
[in]viewNumberview to turn on
Returns
SUCCESS if the view is turned on (or already on) and MDLERR_BADVIEWNUMBER if viewNumber is invalid.
See also
mdlView_turnOff
Remarks
Required Library: mdlbltin.lib
void mdlView_updateMulti ( bool  viewDraw[],
bool  incremental,
DgnPlatform::DgnDrawMode  drawMode,
DgnModelRefListP  modelRefList,
bool  startEndMsg 
)

Update one or more views.

Parameters
[in]viewDrawviews to update. Should be dimensioned to DgnPlatform::MAX_VIEWS, and viewDraw[i] controls whether view i is drawn.
[in]incrementalincremental update (meaning, don't erase before drawing).
[in]drawModepossible values are DRAW_MODE_Normal, ERASE and HILITE. These values draw the elements normally, erase elements from the screen, and highlight elements, respectively.
[in]modelRefLista list of the models to include in the view(s). If modelRefList is NULL, the master and all references are included.
[in]startEndMsgif true, MicroStation displays the "Update in progress" and "Display complete" messages before and after the update.
Remarks
This function returns only after the entire view displays.
Required Library: mdlbltin.lib
void mdlView_updateMultiEx ( bool  viewDraw[],
bool  incremental,
DgnPlatform::DgnDrawMode  drawMode,
DgnModelRefListP  modelRefList,
bool  startEndMsg,
bool  updateViewTitle 
)

Update one or more views.

Parameters
[in]viewDrawviews to update. Should be dimensioned to DgnPlatform::MAX_VIEWS, and viewDraw[i] controls whether view i is drawn.
[in]incrementalincremental update (meaning, don't erase before drawing).
[in]drawModepossible values are DRAW_MODE_Normal, ERASE and HILITE. These values draw the elements normally, erase elements from the screen, and highlight elements, respectively.
[in]modelRefLista list of the models to include in the view(s). If modelRefList is NULL, the master and all references are included.
[in]startEndMsgif true, MicroStation displays the "Update in progress" and "Display complete" messages before and after the update.
[in]updateTitleif true, will update window title
Remarks
This function returns only after the entire view displays.
Required Library: mdlbltin.lib
int mdlView_updateSingle ( int  viewNumber)

Update a single view.

Parameters
[in]viewNumberthe view number to update.
Remarks
This function often needs to be called after a view's settings are changed.
Returns
mdlView_updateSingle returns SUCCESS if the view is updated, MDLERR_BADVIEWNUMBER if viewNumber is invalid, and MDLERR_VIEWNOTDISPLAYED if the view is not currently displayed.
Remarks
This function returns only after the entire view displays.
See also
mdlView_updateMulti mdlView_renderSingle
Remarks
Required Library: mdlbltin.lib
StatusInt mdlView_updateViewInfo ( ViewInfoCP  viewInfoP)

Update the global view information to match the data passed to this function.

Parameters
[in]viewInfoPthe view information with which the global view information will be updated. The view number is contained within the view info information.
Returns
SUCCESS if the operation is completed successfully, otherwise ERROR.
See also
mdlView_copyViewInfo
Remarks
Required Library: mdlbltin.lib
int mdlView_zoom ( int  outView,
int  inView,
Dpoint3d const *  centerPoint,
double  zoomFactor 
)

Change a view's viewing extents.

Parameters
[in]outViewview to change parameters
[in]inViewview to get parameters from (can be the same as outView).
[in]centerPointpoint to zoom about
[in]zoomFactorzoom ratio; if it is greater than 1.0, the effect is to zoom out. If zoomFactor is less than 1.0, the effect is to zoom in. A zoomFactor of 1.0 can be used to center the window.
Remarks
inView and outView can be the same.
After calling this function, you need to update the view to see the changed view extents using mdlView_updateSingle.
Returns
SUCCESS if the view extents are changed and MDLERR_BADVIEWNUMBER or MDLERR_VIEWNOTDISPLAYED if inViewNumber or outViewNumber is invalid or not displayed.
See also
mdlView_updateSingle
Remarks
Required Library: mdlbltin.lib
DgnPlatform::ISprite* mdlViewManager_createSpriteFromIcon ( HICON icon,
bool  useAlpha 
)

Create a sprite from an icon .

Parameters
[in]iconthe windows icon
[in]useAlphause the alpha in the icon
Remarks
Required Library: mdlbltin.lib
DgnPlatform::ISprite* mdlViewManager_loadSpriteFromRsrc ( int  rsrcId,
HINSTANCE hInstancePtr 
)

Create a sprite from a resource .

Parameters
[in]rsrcIdthe resource id
[in]hInstancePtrthe instance to associate with the sprite
Remarks
Required Library: mdlbltin.lib
static ViewFunc_Motion SetMotionFunction ( ViewFunc_Motion  newFunc)
static

An MDL application can use this to set a function to be called when the cursor moved in a view.

Parameters
[in]newFuncThe new function to call, or NULL.
Returns
The return value is the previous function that was set for this MdlApp, or NULL.
See also
ViewFunc_Motion
Remarks
Required Library: mdlbltin.lib
static ViewFunc_Motion SetNoMotionFunction ( ViewFunc_Motion  newFunc)
static

An MDL application can use this to set a function to be called when the cursor is stopped in a view.

Parameters
[in]newFuncThe new function to call, or NULL.
Returns
The return value is the previous function that was set for this MdlApp, or NULL.
See also
ViewFunc_Motion
Remarks
Required Library: mdlbltin.lib
static ViewFunc_SubstituteElem SetSubstituteElemFunction ( ViewFunc_SubstituteElem  substFunc)
static

Set or clear an "element substitution hook" to modify the display of elements in MicroStation views.

Parameters
[in]substFuncfunction to become the new element substituion hook for this application. If NULL, then any previous substituion hook is cleared.
Returns
SUCCESS if the element substitution hook was set/cleared. ERROR if the function pointer is invalid.
Remarks
Required Library: mdlbltin.lib
static ViewFunc_Update SetUpdatePostFunction ( ViewFunc_Update  newFunc)
static

An MDL application can use this to set a function to be called after a view updates.

Parameters
[in]newFuncThe new function to call, or NULL.
Returns
The return value is the previous function that was set for this MdlApp, or NULL.
See also
ViewFunc_UpdatePre
Remarks
Required Library: mdlbltin.lib
static ViewFunc_Update SetUpdatePreFunction ( ViewFunc_Update  newFunc)
static

An MDL application can use this to set a function to be called before a view updates.

Parameters
[in]newFuncThe new function to call, or NULL.
Returns
The return value is the previous function that was set for this MdlApp, or NULL.
See also
ViewFunc_UpdatePre
Remarks
Required Library: mdlbltin.lib

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