TextGraphics Object

Derived from: GraphicsPrimitive Object

Description

The TextGraphics object defines a set of text strings that are displayed within the model. Each coordinate provided defines a new TextGraphics object. For each coordinate you must also provide a text string.

Methods

Name Description
Delete Method that deletes the graphics primitive.
GetTextColor Method that gets the color of the text.
GetTransformBehavior Returns the current view transformation settings (e.g. pixel scaling and front facing).
GetViewSpaceAnchor Method that gets the anchor information of the graphics object. This method returns an error if the 'Anchored' property returns False.
PutTextColor Method that sets the color of the text.
RemoveViewSpaceAnchor The RemoveViewSpaceAnchor method removes the view space anchor from the object, and sets the Anchored property to false.
SetTransformBehavior Sets the view transformation settings (e.g. pixel scaling and front facing).
SetViewSpaceAnchor Method that anchors the graphics object at the specified point in view space. The Anchored property is set to True.

Properties

Name Description
Anchor
Anchored Property that indicates whether this graphics primitive is anchored in view space. This property can only be set to False. The Anchored property is automatically set to True by the SetViewSpaceAnchor method.
Application Returns the top-level parent application object. When used the context of Inventor, an Application object is returned. When used in the context of Apprentice, an ApprenticeServer object is returned.
Bold
BurnThrough
DepthPriority
Font
FontSize
HorizontalAlignment
Id Read-only property that returns the Id of the object.
Italic
Parent Property that returns the parent object from whom this object can logically be reached.
RangeBox Property that returns a Box object which contains the opposing points of a rectangular box that is guaranteed to enclose this object.
Scalable Property that returns whether the TextGraphics object is scalable. If True, the FontSize property can be set a double value indicating its size in model space units.
Text
Type Returns an ObjectTypeEnum indicating this object's type.
VerticalAlignment

Accessed From

GraphicsNode.AddScalableTextGraphics, GraphicsNode.AddTextGraphics, GraphicsNodeProxy.AddScalableTextGraphics, GraphicsNodeProxy.AddTextGraphics

Samples

Name Description
Text Using Client Graphics (Simple) This sample demonstrates creating text using client graphics. It illustrates the simple case where the text is one font and is one line.
Text Using Client Graphics (Multiple fonts and lines) This sample demonstrates creating text using client graphics. It illustrates the more complex case of changes in font and more than one line.
Anchored Client Grahics This sample demonstrates the creation of client graphics that is fully anchored in a view.

Version

Introduced in version 5