Previous Document Next Document

Object Model Reference : Classes : S : SubPath : Properties : SubPath.EndNode


SubPath.EndNode

Property EndNode As Node

Description

Member of SubPath

The EndNode property returns the first node of a subpath.

The EndNode property returns a read-only value.

VBA example

The following VBA example connects all open subpaths to each other, forming a single and larger closed subpath.

Sub Test()
 Dim crv As Curve
 Dim spath As SubPath, spath1 As SubPath
 Set crv = ActiveShape.Curve
 Set spath = crv.Subpaths(1)
 Do
  If Not spath.Closed Then
   Set spath1 = spath.Next
   Do
    If Not spath1.Closed Then Exit Do
    Set spath1 = spath1.Next
   Loop
   spath.EndNode.ConnectWith spath1.StartNode
  Else
   Set spath = spath.Next
   If spath.Index = 1 Then Exit Do
  End If
 Loop
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.