Previous Document Next Document

Object Model Reference : Classes : S : SegmentRange : Methods : SegmentRange.Add


SegmentRange.Add

Sub Add(Segment As Segment)

Description

Member of SegmentRange

The Add method adds a segment to a segment range.

Parameter
Description
Segment
Specifies the segment to be added

VBA example

The following VBA example adds an extra node to the middle of each segment longer than 1", dividing it into two separate segments.

Sub Test()
 Dim sgr As New SegmentRange
 Dim seg As Segment
 Do
  sgr.RemoveAll
  For Each seg In ActiveShape.Curve.Segments
   If seg.Length > 1 Then sgr.Add seg
  Next seg
  If sgr.Count <> 0 Then sgr.AddNode
 Loop While sgr.Count <> 0
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.