Functions

Functions

bool mdlSnap_isActive ()
 Determine whether there is an element currently snapped (either via Tentative point or AccuSnap). More...
 
SnapPathCP mdlSnap_getCurrent ()
 Get the current snap path (either via Tentative point or AccuSnap), if one exists. More...
 
DgnModelRefP mdlSnap_getCurrModelRef ()
 Get the modelRef for the current DgnPlatform::SnapPath, if one exists. More...
 
UInt32 mdlSnap_getCurrHeaderFilePos ()
 Get the filePos of the header of the currently snapped element. More...
 
UInt32 mdlSnap_getCurrElemFilePos ()
 Get the file position of the currently snapped element. More...
 
DPoint3dCP mdlSnap_getPoint ()
 Get the current snap point (either Tentative point or AccuSnap). More...
 
int mdlSnap_getView ()
 Get the view number of the current snap. More...
 
Point2d const * mdlSnap_getScreenPoint ()
 Get the point in screen coordinates of the current snap. More...
 

Detailed Description

Function Documentation

UInt32 mdlSnap_getCurrElemFilePos ( )

Get the file position of the currently snapped element.

Remarks
When the snapped element is a component of a complex element, this funtion returns the filepos of the component element, not its header.
Returns
filepos of the currently snapped element, or 0 if no current snap.
See also
mdlSnap_getCurrHeaderFilePos
SnapPathCP mdlSnap_getCurrent ( )

Get the current snap path (either via Tentative point or AccuSnap), if one exists.

Returns
SnapPath of the current snap, or NULL.
UInt32 mdlSnap_getCurrHeaderFilePos ( )

Get the filePos of the header of the currently snapped element.

Remarks
When the snapped element is a component of a complex element, this funtion returns the filepos of its outermost header. If the snapped element is non-complex, the return values for this function and mdlSnap_getCurrElemFilePos are the same.
Returns
filepos of the header of the currently snapped element, or 0 if none.
See also
mdlSnap_getCurrElemFilePos
DgnModelRefP mdlSnap_getCurrModelRef ( )

Get the modelRef for the current DgnPlatform::SnapPath, if one exists.

Returns
modelRef for current snap path, or NULL
DPoint3dCP mdlSnap_getPoint ( )

Get the current snap point (either Tentative point or AccuSnap).

Remarks
point is in world coordinates
Returns
current snap point, or last tentative point if nothing is snapped.
Point2d const* mdlSnap_getScreenPoint ( )

Get the point in screen coordinates of the current snap.

Returns
current snap location in screen coordinates.
int mdlSnap_getView ( )

Get the view number of the current snap.

Returns
view number
bool mdlSnap_isActive ( )

Determine whether there is an element currently snapped (either via Tentative point or AccuSnap).

Functions for dealing with Snapping

Snapping is the process of finding exact locations on existing elements using various Snap Modes that determine which and how elements are considered.

MicroStation provides two ways for users to snap to existing elements: the Tentative Point, and AccuSnap. Tentative Point snaps to elements only in direct response to a request from the user, whereas AccuSnap snaps whenever the cursor passes over an element. For the most part, these two mechanisms are equivalent. However, these functions provide mechanisms for telling if there is a Snap currently active and if so, whether it was generated by a Tentative Point or by AccuSnap.

Returns
true if currently snapped to an element, false if not.

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