TransientText Class

class NXOpen.Display.TransientText

Bases: NXOpen.TransientObject

Represents temporary text strings which can be used for Temporary Display

New in version NX8.0.0.

Properties

Property Description
Color Returns or sets the index of the color to be used to display the transient text.
FontStyle Returns or sets the style of font to be used to display the transient text.
ReferencePositionType Returns or sets the position of the text relative to positions on the text box
ScreenTextSize Returns or sets the approximate size of the text (small, mendium, large) as measured on the graphics screen.

Methods

Method Description
AddTextString Adds a text string to the TransientText object.
DisplayTemporaryAbsRotScreenSizeGeometry Displays text as temporary display using screen geometry but with rotation defined in absolute space.
DisplayTemporaryAbsoluteGeometry Displays text as temporary display using absolute geometry.
DisplayTemporaryScreenGeometry Displays text as temporary display using screen geometry.
Dispose Frees the object from memory.
GetAbsoluteTextSize Returns the size of the text, in absolute coordinate, in units of the displayed part.
SetAbsoluteTextSize Sets the size of the text, in absolute coordinates, in units of the displayed part.

Enumerations

TransientTextStandardTextRef Enumeration This enumerated type specifies the type of reference point used in the text box for standard_text methods.
TransientTextTextSize Enumeration Provides a way to specify the size of the desired text, as small, medium or large (normal is a synonym for medium).
TransientTextViewType Enumeration the view or views in which the transient text is to be displayed.

Property Detail

Color

TransientText.Color

Returns or sets the index of the color to be used to display the transient text.

If not specified, the System Color will be used.

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

Getter Method

Signature Color

Returns:
Return type:int

New in version NX8.0.0.

License requirements: None.

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

Setter Method

Signature Color

Parameters:colorIndex (int) –

New in version NX8.0.0.

License requirements: None.

FontStyle

TransientText.FontStyle

Returns or sets the style of font to be used to display the transient text.

Every text font has at least one style. To determine which styles a font has, use UF_UGFONT_ask_font_styles. If not specified, the default font style for the font will be used.

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

Getter Method

Signature FontStyle

Returns:
Return type:str

New in version NX8.0.0.

License requirements: None.

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

Setter Method

Signature FontStyle

Parameters:fontStyle (str) –

New in version NX8.0.0.

License requirements: None.

ReferencePositionType

TransientText.ReferencePositionType

Returns or sets the position of the text relative to positions on the text box

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

Getter Method

Signature ReferencePositionType

Returns:
Return type:NXOpen.Display.TransientTextStandardTextRef

New in version NX8.0.0.

License requirements: None.

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

Setter Method

Signature ReferencePositionType

Parameters:referencePositionType (NXOpen.Display.TransientTextStandardTextRef) –

New in version NX8.0.0.

License requirements: None.

ScreenTextSize

TransientText.ScreenTextSize

Returns or sets the approximate size of the text (small, mendium, large) as measured on the graphics screen.

This property is not used by Display.TransientText.DisplayTemporaryAbsoluteGeometry().

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

Getter Method

Signature ScreenTextSize

Returns:
Return type:NXOpen.Display.TransientTextTextSize

New in version NX8.0.0.

License requirements: None.

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

Setter Method

Signature ScreenTextSize

Parameters:textSize (NXOpen.Display.TransientTextTextSize) –

New in version NX8.0.0.

License requirements: None.

Method Detail

AddTextString

TransientText.AddTextString

Adds a text string to the TransientText object.

A TransientText object may have one or more text strings. If an attempt is made to display a TransientText object with zero text strings, an error will be returned.

Signature AddTextString(textString)

Parameters:textString (str) –

New in version NX8.0.0.

License requirements: None.

DisplayTemporaryAbsRotScreenSizeGeometry

TransientText.DisplayTemporaryAbsRotScreenSizeGeometry

Displays text as temporary display using screen geometry but with rotation defined in absolute space.

The text will be displayed on the XY plane of the absolute coordinate system. Insure that you have set all needed properties before using this method. This method is not supported for 2D output such as CGM.

Signature DisplayTemporaryAbsRotScreenSizeGeometry(fontIndex, view, viewType, object, position)

Parameters:
  • fontIndex (int) – The index of the font to be used. This may be 0, which means to use the default font.
  • view (NXOpen.View) – The view in which to display the text. This may be None, in which case the viewType argument is used.
  • viewType (NXOpen.Display.TransientTextViewType) – Used only when view is None.
  • object (NXOpen.DisplayableObject) – May be None, in which case the text will be drawn at the given position. If not None, draw the text at the attention point of object.
  • position (NXOpen.Point3d) – In Absolute Coordinates

New in version NX8.0.0.

License requirements: None.

DisplayTemporaryAbsoluteGeometry

TransientText.DisplayTemporaryAbsoluteGeometry

Displays text as temporary display using absolute geometry.

Insure that you have set all needed properties before using this method. Note that the text will be displayed on the Absolute XY plane.

Signature DisplayTemporaryAbsoluteGeometry(fontIndex, view, viewType, object, position)

Parameters:
  • fontIndex (int) – The index of the font to be used. This may be 0, which means to use the default font.
  • view (NXOpen.View) – The view in which to display the text. This may be None, in which case the viewType argument is used.
  • viewType (NXOpen.Display.TransientTextViewType) – Used only when view is None.
  • object (NXOpen.DisplayableObject) – May be None, in which case the text will be drawn at the given position. If not None, draw the text at the attention point of object.
  • position (NXOpen.Point3d) – In Absolute Coordinates

New in version NX8.0.0.

License requirements: None.

DisplayTemporaryScreenGeometry

TransientText.DisplayTemporaryScreenGeometry

Displays text as temporary display using screen geometry.

Insure that you have set all needed properties before using this method. This method is not supported for 2D output such as CGM. Note that the text will be displayed on the Absolute XY plane.

Signature DisplayTemporaryScreenGeometry(fontIndex, view, viewType, object, position)

Parameters:
  • fontIndex (int) – The index of the font to be used. This may be 0, which means to use the default font.
  • view (NXOpen.View) – The view in which to display the text. This may be None, in which case the viewType argument is used.
  • viewType (NXOpen.Display.TransientTextViewType) – Used only when view is None.
  • object (NXOpen.DisplayableObject) – May be None, in which case the text will be drawn at the given position. If not None, draw the text at the attention point of object.
  • position (NXOpen.Point3d) – In Absolute Coordinates

New in version NX8.0.0.

License requirements: None.

Dispose

TransientText.Dispose

Frees the object from memory.

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 NX8.0.0.

License requirements: None.

GetAbsoluteTextSize

TransientText.GetAbsoluteTextSize

Returns the size of the text, in absolute coordinate, in units of the displayed part.

These values are only only used by Display.TransientText.DisplayTemporaryAbsoluteGeometry().

Signature GetAbsoluteTextSize()

Returns:a tuple
Return type:A tuple consisting of (glyphWidth, glyphHeight) glyphWidth is a float. glyphHeight is a float.

New in version NX8.0.0.

License requirements: None.

SetAbsoluteTextSize

TransientText.SetAbsoluteTextSize

Sets the size of the text, in absolute coordinates, in units of the displayed part.

These values are only used by Display.TransientText.DisplayTemporaryAbsoluteGeometry().

Signature SetAbsoluteTextSize(glyphWidth, glyphHeight)

Parameters:
  • glyphWidth (float) –
  • glyphHeight (float) –

New in version NX8.0.0.

License requirements: None.