AddTextOutlines

Adds outline curves created from a text string to the document. The functionality is similar to what you find in Rhino's TextObject command.

Syntax

Rhino.AddTextOutlines (strText [, dblHeight [, strFont [, intStyle [, blnCloseLoops [, arrPlane [, dblSmallCapsScale]]]]]])

Parameters

strText

Required. String.  The text from which to create outline curves.

dblHeight

Optional.  Number.  The text height.  If omitted, a height of 1.0 units is used.

strFont

Optional.  String.  The text font.  If omitted, the Arial font is used.

intStyle

Optional. Number.  The font style.  If omitted, a normal font style (0) is used.  The font style can be any number of the following flags:

Value

Description

0

Normal

1

Bold

2

Italic

blnCloseLoops

Optional.  Boolean.  Set this value to True when dealing with normal fonts and when you expect closed loops. You may want to set this to False when specifying a single-stroke font where you don't want closed loops. If omitted, True is specified.

arrPlane

Optional.  Array.  The plane on which the outline curves will lie.  If omitted, the curves will lie on the world X-Y plane with the lower-left corner of output curves bounding box at (0,0,0).

dblSmallCapsScale

Optional.  Number. Displays lower-case letters as small caps. Set the relative text size to a percentage of the normal text.. Set to 1.0 (Default) for no small caps.

Returns

Array

An array containing one or more arrays of curve object identifier (one array for each glyph or letter) if successful.

Null

If not successful, or on error.

Example

Dim arrGlyphs, arrGlyph, i, strCurve

arrGlyphs = Rhino.AddTextOutlines("Hello Rhino!", 10)

If IsArray(arrGlyphs) Then

  For i = 0 to UBound(arrGlyphs)

    Call Rhino.Print("Glyph " & CStr(i))

    arrGlyph = arrGlyphs(i)

    If IsArray(arrGlyph) Then

      For Each strCurve in arrGlyph

        Call Rhino.Print(strCurve)

      Next

    End If

  Next

End If

Also See

AddPlanarSrf

ExtrudeCurve

ExtrudeSurface