Previous Document Next Document

Object Model Reference : Classes : S : Shape : Methods : Shape.GetPosition


Shape.GetPosition

Sub GetPosition(PositionX As Double, PositionY As Double)

Description

Member of Shape

The GetPosition method returns the coordinates of a point on a shape as specified by the Document.ReferencePoint property.

 
See also the Shape.PositionX and Shape.PositionY properties.

Parameter
Description
PositionX
Specifies, in document units, the horizontal position of the shape
PositionY
Specifies, in document units, the vertical position of the shape

VBA example

The following VBA example creates a small circle in the center of each shape on the page.

Sub Test()
 Dim x As Double, y As Double
 Dim s As Shape
 ActiveDocument.ReferencePoint = cdrCenter
 For Each s In ActivePage.Shapes
  s.GetPosition x, y
  ActiveLayer.CreateEllipse2 x, y, 0.03
 Next s
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.