Sets or returns the current snap spacing setting value.
Syntax
object.GetSnapSpacing(Xspacing, Yspacing)
Where:
object is a CADopia Viewport or PViewport object;
Xspacing and Yspacing are double-precision variables (or values) representing the spacing of grids along the x and y axes.
GetSnapSpacing method example
Sub GetSnapSpacing_Example()
' This example finds the current Snap spacing.
' First, find the current active viewport
Dim viewportObj As CADopia.Viewport
Dim XSnap As Double
Dim YSnap As Double
Set viewportObj = ThisDocument.ActiveViewport
' Turn on Snap and reset the viewport.
viewportObj.SnapOn = True
ThisDocument.ActiveViewport = viewportObj
' Find the current Snap spacing
viewportObj.GetSnapSpacing XSnap, YSnap
MsgBox "X Snap Spacing = " & XSnap & " Y Snap Spacing = " & YSnap
End Sub
Comments