Previous Document Next Document

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


ShapeRange.GetPosition

Sub GetPosition(PositionX As Double, PositionY As Double)

Description

Member of ShapeRange

The GetPosition method retrieves the horizontal and vertical positions of all the shapes in a shape range, treating the range as a single object.

 
The position of the shape range is set relative to the reference point specified by the Document.ReferencePoint property.

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

VBA example

The following VBA example creates an ellipse with the dimensions of the active selection range.

Sub Test()
 Dim x As Double, y As Double
 ActiveDocument.ReferencePoint = cdrCenter
 ActiveSelectionRange.GetPosition x, y
 ActiveLayer.CreateEllipse2 x, y, 0.05
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.