API Documentation > CorelDRAW > 2025-v26 > ShapeRange > IVGShapeRange
ShapeRange.RestoreCloneLink method
Restores clone links for the shapes in the shape range.
Syntax:
Sub RestoreCloneLink(ByVal LinkToRestore As cdrCloneLinkType)
Parameters:
Name Type Description
LinkToRestore
Remarks:
The RestoreCloneLink method restores clone links of a specified property for the shapes in a shape range.
Examples:
The following VBA example creates a shape range, clones it, and fills the clone. The clone link is then restored.
Sub Test()
Dim s As Shape
Dim sr1 As ShapeRange
Dim sr2 As ShapeRange
Set s = ActiveLayer.CreateRectangle(2, 2, 4, 4)
s.Fill.ApplyUniformFill CreateRGBColor(255, 0, 0)
Set s = ActiveLayer.CreateRectangle2(1, 4, 5, 5)
s.Fill.ApplyUniformFill CreateRGBColor(0, 255, 0)
Set s = ActiveLayer.CreatePolygon(1, 2, 3, 4, 6)
Set sr = ActivePage.FindShapes(, cdrRectangleShape)
Set sr2 = sr.Clone
sr2.ApplyUniformFill CreateRGBColor(0, 0, 255)
sr2.RestoreCloneLink cdrCloneFill 
End Sub