TextComponent Class

class NXOpen.Annotations.TextComponent

Bases: NXOpen.TransientObject

Represents a single text in an annotation and can be queried for information about that text.

This information includes the type of text, the number of lines of text, the lines of text, and the origin in absolute coordinates. .. versionadded:: NX6.0.0

Properties

Property Description
Height Returns the text height.
Length Returns the text length.
NumberLines Returns the number of lines of text.
Origin Returns the text origin in absolute coordinates.
Type Returns the text type.

Methods

Method Description
Dispose Free resources associated with the text component.
GetDistanceToTop The distance from the origin to the top of text.
GetIntegerizedLength The text integerized length.
GetText Gets all of the text for the text component.

Enumerations

TextComponentTextType Enumeration the text type.

Property Detail

Height

TextComponent.Height

Returns the text height.

-------------------------------------

Getter Method

Signature Height()

Returns:the text height
Return type:float

New in version NX6.0.0.

License requirements: None.

Length

TextComponent.Length

Returns the text length.

-------------------------------------

Getter Method

Signature Length()

Returns:the text length
Return type:float

New in version NX6.0.0.

License requirements: None.

NumberLines

TextComponent.NumberLines

Returns the number of lines of text.

-------------------------------------

Getter Method

Signature NumberLines()

Returns:the number of lines of text
Return type:int

New in version NX6.0.0.

License requirements: None.

Origin

TextComponent.Origin

Returns the text origin in absolute coordinates.

If the annotation is on a drawing, origin is returned in drawing space. If the annotation is on the model, origin is returned in model space.

-------------------------------------

Getter Method

Signature Origin()

Returns:the text origin in absolute coordinates
Return type:NXOpen.Point3d

New in version NX6.0.0.

License requirements: None.

Type

TextComponent.Type

Returns the text type.

-------------------------------------

Getter Method

Signature Type()

Returns:the text type
Return type:NXOpen.Annotations.TextComponentTextType

New in version NX6.0.0.

License requirements: None.

Method Detail

Dispose

TextComponent.Dispose

Free resources associated with the text component.

After this method is called, it is illegal to use the object. In .NET, this method is automatically called when the object is deleted by the garbage collector.

Signature Dispose()

New in version NX6.0.0.

License requirements: None.

GetDistanceToTop

TextComponent.GetDistanceToTop

The distance from the origin to the top of text.

Signature GetDistanceToTop()

Returns:the distance from the origin to the top of text
Return type:float

New in version NX6.0.0.

License requirements: None.

GetIntegerizedLength

TextComponent.GetIntegerizedLength

The text integerized length.

Signature GetIntegerizedLength(nth)

Parameters:nth (int) – the nth text. nth starts with 0.
Returns:the text integerized length
Return type:int

New in version NX6.0.0.

License requirements: None.

GetText

TextComponent.GetText

Gets all of the text for the text component.

Signature GetText()

Returns:the lines of text
Return type:list of str

New in version NX6.0.0.

License requirements: None.