Previous Document Next Document

Object Model Reference : Classes : S : SubPaths : Properties : SubPaths.Count


SubPaths.Count

Property Count As Long

Description

Member of SubPaths

The Count property returns the number of subpaths in a SubPaths collection.

The Count property returns a read-only value.

VBA example

The following VBA example extracts each subpath from a curve and changes the color of each extracted subpath.

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

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.