Object Model Reference : Classes : L : Layer : Methods : Layer.CreateGuide |
Function CreateGuide(x1 As Double, y1 As Double, x2 As Double, y2 As Double) As Shape
Member of Layer
The CreateGuide method creates a guideline, at a specified location on a layer, by using two points.
The following VBA example divides a page into 4 × 8 rectangles by using guidelines.
Sub Test() |
Const sx As Long = 4 |
Const sy As Long = 8 |
Dim i As Long |
Dim px As Double, py As Double |
px = ActivePage.SizeWidth |
py = ActivePage.SizeHeight |
For i = 0 To sx |
ActiveLayer.CreateGuide i * px / sx, 0, i * px / sx, py |
Next i |
For i = 0 To sy |
ActiveLayer.CreateGuide 0, i * py / sy, px, i * py / sy |
Next i |
End Sub |
Copyright 2013 Corel Corporation. All rights reserved.