Previous Document Next Document
ShapeRange.GetPosition

Sub GetPosition(PositionX As Double, PositionY As Double)

Member of ShapeRange

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

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

Parameters
Description
PositionX
Returns the horizontal position of the shape range, in document units
PositionY
Returns the vertical position of the shape range, in document units

The following code 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 2007 Corel Corporation. All rights reserved.