Previous Document Next Document
ShapeRange.Duplicate

Function Duplicate([OffsetX As Double], [OffsetY As Double]) As ShapeRange

Member of ShapeRange

The Duplicate method duplicates each shape in the range, and it returns another shape range collection containing all of the duplicates.

Parameters
Description
OffsetX
Specifies the horizontal distance to offset the duplicated shape range
This parameter is optional, and its default value is 0.
OffsetY
Specifies the vertical distance to offset the duplicated shape range
This parameter is optional, and its default value is 0.

The following code example duplicates each curve shape, removes any fills in the range, assigns a thick outline to each duplicate, and groups all of the duplicated curves:

Sub Test() 
 Dim sr As ShapeRange 
 Set sr = ActiveLayer.FindShapes(, cdrCurveShape) 
 Set sr = sr.Duplicate 
 sr.ApplyNoFill 
 sr.SetOutlineProperties 0.1 
 sr.Group 
End Sub 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.