The CreateGridBoxes method creates a group of rectangles (similarly to using the Graph Paper tool) at a specified location on a layer.
Parameter
Description
Left
Specifies the distance from the left side of the first rectangle grid box to the left side of the page frame. This value is measured in document units.
Top
Specifies the distance from the top of the first rectangle grid box to the top of the page frame. This value is measured in document units.
Right
Specifies the distance from the right side of the first rectangle grid box to the right side of the page frame. This value is measured in document units.
Bottom
Specifies the distance from the bottom of the first rectangle grid box to the bottom of the page frame. This value is measured in document units.
Wide
Specifies the horizontal size of each rectangular grid box. This value is measured in document units.
High
Specifies the vertical measurement of the rectangle. This value is measured in document units.
VBA example
The following VBA example creates a series of rectangles on the active layer, resembling 2 × 3 graph paper.
Sub Test()
ActiveLayer.CreateGridBoxes 0, 0, 5, 5, 2, 3
End Sub
Copyright 2013 Corel Corporation. All rights reserved.