Object Model Reference : Classes : S : SubPath : Methods : SubPath.Extract |
Function Extract([OldCurve As Shape]) As Shape
Member of SubPath
The Extract method removes a subpath from a curve and creates a separate shape from the extracted subpath.
Parameter
|
Description
|
OldCurve
|
References the original curve after the extraction by returning a shape. This parameter is optional, and its default value is Nothing.
|
The following VBA example extracts each subpath from a curve and changes the outline color of each extracted curve.
Sub Test() |
Dim spath As SubPath |
Dim s As Shape, sExt As Shape |
Dim i As Long |
Set s = ActiveShape |
If s.Curve.Subpaths.Count < 2 Then Exit Sub |
For i = s.Curve.Subpaths.Count To 1 Step -1 |
Set spath = s.Curve.Subpaths(i) |
Set sExt = spath.Extract(s) |
sExt.Outline.Width = 0.01 |
sExt.Outline.Color = ActivePalette.Color(13 + i) |
Next i |
End Sub |
Copyright 2013 Corel Corporation. All rights reserved.