Previous Document Next Document
ShapeRange.RestoreCloneLink

Sub RestoreCloneLink(LinkToRestore As cdrCloneLinkType)

Member of ShapeRange

The RestoreCloneLink method restores clone links of the specified property for the shapes in the shape range.

Parameters
Description
LinkToRestore
Specifies the link to be restored

The following code 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 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.