API Documentation > CorelDRAW > 2025-v26 > ShapeRange > IVGShapeRange
ShapeRange.GetSize method
returns the width and height of the shape range
Syntax:
Sub GetSize(ByRef Width As Double, ByRef Height As Double)
Parameters:
Name Type Description
Width
Double
Height
Double
Remarks:
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.
Examples:
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