Previous Document Next Document

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


SegmentRange.AddRange

Sub AddRange(SegmentRange As SegmentRange)

Description

Member of SegmentRange

The AddRange method adds segments from a specified segment range to the active range, combining the two ranges.

Parameter
Description
SegmentRange
Specifies the range of segment items to add to the active segment range

VBA example

The following VBA example creates a text object containing the letter B and converts it to curves. Then it creates a range containing the segments from the second and third subpaths (that is, the inner “holes” in the letter B) and converts those segments to lines.

Sub Test()
 Dim s As Shape
 Dim sgr As SegmentRange
 Set s = ActiveLayer.CreateArtisticText(0, 0, "B")
 With s.Text.FontProperties
  .Name = "Arial Black"
  .Size = 72
 End With
 s.ConvertToCurves
 Set sgr = s.Curve.Subpaths(2).Segments.All
 sgr.AddRange s.Curve.Subpaths(3).Segments.All
 sgr.SetType cdrLineSegment
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.