API Documentation > CorelDRAW > 2025-v26 > Shape > IVGShape
Shape.Duplicate method
Duplicates the shape
Syntax:
Function Duplicate(Optional ByVal OffsetX As Double = 0, Optional ByVal OffsetY As Double = 0) As Shape
Parameters:
Name Type Description
OffsetX
Double
Specifies the horizontal distance to offset the duplicated shape.
OffsetY
Double
Specifies the vertical distance to offset the duplicated shape.
Remarks:
The Duplicate method duplicates a shape and places the duplicate at the specified offset relative to the original shape position, returning a Shape object for the duplicated shape.
Examples:
The following VBA example creates an ellipse, duplicates it, and creates a blend between the two shapes.
Sub Test()
Dim s1 As Shape, s2 As Shape
Set s1 = ActiveLayer.CreateEllipse(2, 7, 4, 5)
Set s2 = s1.Duplicate(3, -5)
s1.Fill.UniformColor.CMYKAssign 0, 0, 100, 0
s2.Fill.UniformColor.CMYKAssign 0, 100, 100, 0
s2.CreateBlend s1 
End Sub