My favorites | English | Sign in

Faster apps faster - GWT 2.0 with Speed Tracer New!

Google SketchUp Ruby API

Text

class

Introduction

SketchUp 6.0+

The Text class contains method to manipulate a Text entity object.

Methods

Text.arrow_typeSketchUp 6.0+

The arrow_type method retrieves the current arrow type used for the leader text.

Valid arrow types are 0 for none, 2 for dot, 3 for closed arrow, 4 for open arrow.

Returns:

arrow
a numerical representation for the type of arrow.
 type = text.arrow_type=0

Text.arrow_type=SketchUp 6.0+

The arrow_type= method sets the arrow type used for leader text.

Valid arrow types are 0 for none, 2 for dot, 3 for closed arrow, 4 for open arrow.

Arguments:

type
A numerical representation of the type of arrow to be set.

Returns:

arrow
a numerical representation for the type of arrow.
 arrow = text.arrow_type=type

Text.display_leader=SketchUp 6.0+

The display_leader= method accepts true or false for whether to display the leader.

Leader text that is not displayed is set to Hidden type.

Arguments:

status
true if you want to display the leader text, false if you do not want to display the leader text.

Returns:

status
the status that you set.
 leader = text.display_leader=true

Text.display_leader?SketchUp 6.0+

The display_leader? method returns the status of the leader.

Returns:

status
true if the leader is being displayed, false if it is not displayed.
 status = text.display_leader

Text.has_leader?SketchUp 6.0+

The has_leader method is used to determine if the Text object has a leader.

Returns:

status
true if the Text object has a leader. False if the Text object does not have a leader.
 status = text.has_leader

Text.leader_typeSketchUp 6.0+

The leader_type method retrieves the currently set leader type.

Arguments:

leader
A numerical value representing the currently set leader type.

Returns:

leader
a numerical value representing the currently set leader type.
 leader = text.leader_type

Text.leader_type=SketchUp 6.0+

The leader_type = method sets the leader type.

Valid leader types are 0 for none, 1 for View based, and 2 for Pushpin

Arguments:

type
A numerical value representing the leader type to be set.

Returns:

leader
a numerical value representing the leader type you just set.
 leader = text.leader_type=1

Text.line_weightSketchUp 6.0+

The line_weight method returns a line weight in number of pixels.

Defalt line weight is 1.

Returns:

lineweight
the line weight in pixels
 weight = text.line_weight

Text.line_weight=SketchUp 6.0+

The line_weight= method sets the line weight in pixels.

Default line weight is 1.

Arguments:

weight
The line weight to be set (in pixels).

Returns:

The line weight that has been set.
 newweight = text.line_weight = 4

Text.pointSketchUp 6.0+

The point method is used to get the point associated with the text.

Returns:

point
a Point3d object.
 point3d = text.point

Text.point=SketchUp 6.0+

The point= method is used to set the point associated with the text.

Arguments:

point3d
A Point3d object.

Returns:

status
true if successful, false if unsuccessful.
 status = text.point = point3d

Text.set_textSketchUp 6.0+

The set_text method is used to set the text within a Text object without recording an Undo operation.

Arguments:

textstring
The string to be set within the Text object.

Returns:

text
the Text object
 text = text.set_text "This is another text"

Text.textSketchUp 6.0+

The text method is used to retrieve the string version of a Text object.

Returns:

textstring
the string representation of the Text object
 textstring = text.text

Text.text=SketchUp 6.0+

The text= method is used to set the string version of a Text object.

Returns:

textstring
the newly set text
 textstring = text.text= "text"

Text.vectorSketchUp 6.0+

The vector method is used to get the vector associated with the text.

Returns:

vector
a Vector3d object.
 vector = text.vector

Text.vector=SketchUp 6.0+

The vector= method is used to set the vector associated with the text.

Arguments:

vector
A Vector3d object.

Returns:

success
true if successful.
 vector = text.vector