AddText

Adds a text string to the document.

Syntax

rhinoscriptsyntax.AddText ( text, point_or_plane, height=1.0, font="Arial", font_style=0, justification=None )

rhinoscript.geometry.AddText ( text, point_or_plane, height=1.0, font="Arial", font_style=0, justification=None )

Parameters

text

Required. String.  The text to display.

point_or_plane

Required.  A 3-D point or the  plane on which the text will lie.  The origin of the plane will be the origin point of the text.

height

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

font

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

font_style

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

justification

Optional.  Integer.  The text justification. Possible values are. NOTE: Values may be added to create combinations

Value

Description

1

Left

2

Center (horizontal)

4

Right

65536

Bottom

131072

Middle (vertical)

262144

Top

 

Returns

Guid

The identifier of the new object if successful.

None

If not successful, or on error.

Example

import rhinoscriptsyntax as rs

point = rs.GetPoint("Pick point")

if point: rs.AddText("Hello Rhino!", point)

Also See

IsText