Previous Document Next Document

Object Model Reference : Classes : L : Layer : Methods : Layer.CreateGuide


Layer.CreateGuide

Function CreateGuide(x1 As Double, y1 As Double, x2 As Double, y2 As Double) As Shape

Description

Member of Layer

The CreateGuide method creates a guideline, at a specified location on a layer, by using two points.

Parameter
Description
x1
Specifies the x-coordinate for the first point that defines the guideline. This value is measured in document units.
y1
Specifies the y-coordinate for the first point that defines the guideline. This value is measured in document units.
x2
Specifies the x-coordinate for the second point that defines the guideline. This value is measured in document units.
y2
Specifies the y-coordinate for the second point that defines the guideline. This value is measured in document units.

VBA example

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

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.