GetGridSpacing Method (IntelliCAD)

IntelliCAD 11.1 Object Library
GetGridSpacing Method
See Also 
Xspacing
The grid spacing along the x-axis.
Yspacing
The grid spacing along the y-axis.
PViewport Object : GetGridSpacing Method

Description

Returns the grid spacing value

Syntax

Visual Basic
Public Sub GetGridSpacing( _
   ByRef Xspacing As Double, _
   ByRef Yspacing As Double _
) 

Parameters

Xspacing
The grid spacing along the x-axis.
Yspacing
The grid spacing along the y-axis.

Example

Sub GetGridSpacing_Example()

     ' This example turns on the grid for the current viewport.

     ' It then finds and displays a message with the current grid spacing.

 

     Dim viewportObj As IntelliCAD.Viewport

     Dim XGrid As Double

     Dim YGrid As Double

     Set viewportObj = ThisDocument.ActiveViewport

     ' Turn on the grid and reset the viewport to see it come on.

     viewportObj.GridOn = True

     ThisDocument.ActiveViewport = viewportObj

     ' Find the current grid spacing

     viewportObj.GetGridSpacing XGrid, YGrid

     MsgBox "X Grid spacing = " & XGrid & " Y Grid spacing = " & YGrid

End Sub

See Also

© 2022 IntelliCAD Technology Consortium. All Rights Reserved.