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

Description

Sets or returns the grid spacing value for the viewport.

Syntax

Visual Basic
Public Sub SetGridSpacing( _
   ByVal Xspacing As Double, _
   ByVal Yspacing As Double _
) 

Parameters

Xspacing
Grid spacing along the x-axis.
Yspacing
Grid spacing along the y-axis.

Example

Sub Example_SetGridSpacing()

' This example sets the current X- and Y-grid spacing to 2.

     Dim viewportObj As IntelliCAD.Viewport

     Set viewportObj = ThisDocument.ActiveViewport

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

     viewportObj.GridOn = True

     ThisDocument.ActiveViewport = viewportObj

     ' Set the current grid spacing

     viewportObj.SetGridSpacing 2, 2

     ThisDocument.ActiveViewport = viewportObj

End Sub

See Also

© 2022 IntelliCAD Technology Consortium. All Rights Reserved.