Previous Document Next Document

Object Model Reference : Classes : S : Shape : Methods : Shape.Separate


Shape.Separate

Sub Separate()

Description

Member of Shape

The Separate method separates effect shapes (that is, combined shapes or linked groups, such as blend groups or drop shadows).

 
This method is provided for compatibility reasons. The suggested method is Effect.Separate.
VBA example 1

The following VBA example creates a blend between two ellipses and separates it.

Sub Test()
 Dim s1 As Shape, s2 As Shape
 Set s1 = ActiveLayer.CreateEllipse(0, 10, 2, 8)
 Set s2 = s1.Duplicate(5, -7)
 s1.Fill.UniformColor.CMYKAssign 0, 0, 100, 0
 s2.Fill.UniformColor.CMYKAssign 0, 100, 100, 0
 s2.CreateBlend(s1).Blend.BlendGroup.CreateSelection
 s2.Selected = True
 s1.Selected = True
 ActiveSelection.Separate
End Sub
VBA example 2

The following VBA example performs the same procedure as the previous example but using the Effect.Separate method.

Sub Test()

 Dim s1 As Shape, s2 As Shape

 Set s1 = ActiveLayer.CreateEllipse(0, 10, 2, 8)

 Set s2 = s1.Duplicate(5, -7)

 s1.Fill.UniformColor.CMYKAssign 0, 0, 100, 0

 s2.Fill.UniformColor.CMYKAssign 0, 100, 100, 0

 s2.CreateBlend(s1).Separate

End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.