IntelliCAD 11.1 Object Library
GetGridSpacing Method
See Also 
Xspacing
Grid spacing along the x-axis.
Yspacing
Grid spacing along the y-axis.
Viewport Object : GetGridSpacing Method

Description

Sets or returns the current grid spacing setting value.

Syntax

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

Parameters

Xspacing
Grid spacing along the x-axis.
Yspacing
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.