VCGetRunningSnapType
VCSetRunningSnapType


Version:

4.0

Description:

Sets the snap types for Running Snaps.

Declaration:

 

C/C++

extern "C" DWORD WINAPI VCGetRunningSnapType(short* iError);
extern "C" void WINAPI VCSetRunningSnapType(short* iError, DWORD dwFlags, WORD wOperation);

Delphi

function VCGetRunningSnapType(var iError: Smallint): Longint; stdcall;
procedure VCSetRunningSnapType(var iError: Smallint; dwFlags: Longint; wOperation: Smallint); stdcall;

ActiveX/COM

Function GetRunningSnapType() As DWORD
Sub SetRunningSnapType(ByVal dwFlags As DWORD, ByVal wOperation As WORD)

Parameters:

dwFlags - the Running Snap bitwise flags. These flags are defined in VCTypes32.h:
NOSNAP - No running snaps.
OSNAP_END - Snap End Point.
OSNAP_OBJ - Snap Object.
OSNAP_MID - Snap Midpoint.
OSNAP_INT - Snap Intersection.
OSNAP_PERP - Snap Perpendicular.
OSNAP_TAN - Snap Tangent.
OSNAP_QUAD - Snap Quadrant.
OSNAP_PER - Snap Percent. Controlled by VCSetSnapPercentVal
OSNAP_CEN - Snap Center.
OSNAP_GRID - Snap Grid.
OSNAP_ALL - All running snaps.

wOperation - The flag which controls how the dwFlags are handled. These flags are defined in VCTypes32.h:
Op_Assign - Replace existing flags with supplied flags.
Op_OR - Add supplied flags to existing flags.
Op_AND - Keep only the flags that are in both the supplied flags and the existing flags.
Op_Restore - Restore the previous state of the supplied flags.

Return Value:

The current Running Snap bitwise flags. These flags are defined in VCTypes32.h

iError Code:

0 - Success
1 - Invalid World

Notes:

VCSetRunningSnapType can be used to add to, remove from, or overwrite the current running snap flags by using the desired wOperation flag.

To create a Visual CADD™ "UserTool" that responds to running snaps, you must use VCSetUserToolSnapable.

If you are using the Visual CADD™ DLLs in a stand-alone application, you must use VCOnTimerRunningSnap to have running snaps work.

See Also:

VCOnTimerRunningSnap, VCGetUserToolSnapable, VCGetAllLayersSnap, VCGetSnapPercentVal, VCGetSymSnap