Share

TextBox Object


Description

The TextBox object represents text on a sheet or sketch.

Methods

Name Description
ConvertToGeometry Method that converts the text box to sketch geometries.
Delete Method that deletes the text box.
GetFacetsInfo Returns facets’ coordinates of the text box.
GetReferenceKey Method that generates and returns the reference key for this entity.

Properties

Name Description
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.
AttributeSets Property that returns the AttributeSets collection object associated with this object.
BackgroundColor Gets/Sets the BackgroundColor associated with the TextBox.
BoundaryGeometry Property that returns the four construction sketch lines that form the boundary of the text box.
Color Gets/Sets the color of the text box.
ContainingSketchBlock Property that returns the sketch block that contains this object. This is the same SketchBlock returned as the last item in the SketchBlockPath property. This property returns Nothing if this object does not belong to a sketch block and lives directly under a sketch.
Fitted Property that returns if the text box remains tightly fitted to the text within the box. True indicates the text box just encloses the text.
FittedTextHeight Property that returns the actual height of the text within the text box. This does not necessarily represent the current height of the text box, but only the text within the box. If the Fitted property is True then this value is the same as the height of the text box.
FittedTextWidth Property that returns the actual width of the text within the text box. This does not necessarily represent the current width of the text box, but only the text within the box. If the Fitted property is True then this value is the same as the width of the text box.
FormattedText Gets and sets the fully formatted string that defines the contents of the text box.
Height Gets and sets the height of the text box.
HorizontalJustification Gets and sets the horizontal justification override of the text box.
Layer Gets and sets the layer applied to this text box.
LineSpacing Gets and sets the line spacing of the text box.
LineSpacingType Gets and sets the method used to define the line spacing.
Origin Gets and sets the position of upper-left corner of the text box.
OriginSketchPoint Gets the SketchPoint on the origin of this TextBox. This will be Nothing in the case that the boundaries are displayed
Parent Property that returns the parent object from whom this object can logically be reached.
RangeBox Property that returns a Box2D object which contains the lower-left and upper-right corners of a rectangle that is guaranteed to enclose this object.
Rotation Gets and sets the override rotation of the text box.
ShowBoundaries Gets and sets whether boundary geometry is displayed for the text box.
SingleLineText Gets/Sets the single line text option. If True, all line breaks are removed from multi-line text.
SketchBlockPath Property that returns the path of sketch blocks at the leaf of which this sketch object is found. The enumerator returns a count of 0 if the object lives directly under a sketch.
StackedTextPosition Gets and sets the position (alignment) of the stacked text with respect to regular text.
Style Gets/Sets the text style associated with the text box.
Text Gets and sets the string that defines the contents of the text box.
Type Returns an ObjectTypeEnum indicating this object's type.
UseBackgroundColor Gets/Sets the UseBackgroundColor associated with the TextBox.
VerticalJustification Gets and sets the vertical justification override of the text box.
Width Gets and sets the width of the text box.
WidthScale Gets and sets override stretch factor for the text box.

Accessed From

ProfilePath.TextBox, ProfilePathProxy.TextBox, TextBoxConstraint.TextBox, TextBoxConstraintProxy.TextBox, TextBoxes.AddByRectangle, TextBoxes.AddFitted, TextBoxes.Item, TextBoxProxy.NativeObject

Derived Classes

TextBoxProxy

Samples

Name Description
Create SketchedSymbol Definition This sample illustrates creating a new sketched symbol definition object and inserting it into the active sheet.
Sketch Text Add This sample illustrates creating text in a sketch.
Title Block Definition Create and Insert This sample illustrates creating a new title block definition object and inserting it into the active sheet. This sample consists of two subs. The first demonstrates the creation of a title block definition and the second inserts it into the active sheet.

Version

Introduced in version 5.3

Was this information helpful?