API Documentation > CorelDRAW > 2025-v26 > Grid > IVGGrid
Grid.SetFrequency method
Gets or sets the frequency
Syntax:
Sub SetFrequency(ByVal GridX As Double, ByVal GridY As Double)
Parameters:
Name Type Description
GridX
Double
GridY
Double
Remarks:
The SetFrequency method specifies grid spacing as frequency - the number of grid lines (or dots) per unit of length.
Examples:
The following VBA example sets five lines per inch horizontally and three lines per inch vertically in the grid.
Sub Test()
ActiveDocument.Unit = cdrInch
ActiveDocument.Grid.SetFrequency 5, 3 
End Sub