Previous Document Next Document

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


ShapeRange.Duplicate

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

Description

Member of ShapeRange

The Duplicate method duplicates each shape in a shape range, returning another shape range that contains all the duplicates.

Parameter
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.

VBA example

The following VBA example duplicates each curve shape, removes any fills in the range, assigns a thick outline to each duplicate, and groups all 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 2013 Corel Corporation. All rights reserved.