Previous Document Next Document

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


ShapeRange.GetSize

Sub GetSize(Width As Double, Height As Double)

Description

Member of ShapeRange

The GetSize method retrieves the size of the shapes in a shape range, treating the range as a single object.

 
See also the ShapeRange.SizeWidth and ShapeRange.SizeHeight properties, as well as the ShapeRange.GetBoundingBox and ShapeRange.SetBoundingBox methods.

Parameter
Description
Width
Specifies the width, in document units, of the shape range
Height
Specifies the height, in document units, of the shape range

VBA example

The following VBA example stretches all the shapes on the active layer so that the vertical size of each shape is 1.

Sub Test()
 Dim x As Double, y As Double
 Dim sr As ShapeRange
 Set sr = ActiveLayer.Shapes.All
 If sr.Count > 0 Then
  ActiveDocument.ReferencePoint = cdrCenter
  sr.GetSize x, y
  sr.SetSize x, 1
 End If
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.