Share

TextStyle Object

Derived from: Style Object

Description

The TextStyle object represents a text style in a drawing.

Methods

Name Description
ConvertToLocal Method that creates a local cached copy of a global style and returns the local style.
Copy Method that creates a new local Style object. The newly created style is returned.
Delete Method that deletes the Style/Layer/UnfoldMethod.
GetReferenceKey Method that generates and returns the reference key for this entity.
SaveToGlobal Method that saves this style to the global repository. If a style with the same name is found in the repository, that style is updated.
UpdateFromGlobal Method that updates this style from the global repository.

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.
Bold Gets and sets whether the text style has bold formatting or not. True if the text style has bold formatting.
Color Gets and sets the current color of the text.
Comments Gets and sets comments associated with the style.
Font Gets and sets the font used for the text style.
FontSize Gets and sets the size of the font. The size is specified in centimeters.
HorizontalJustification Gets and sets the horizontal justification of the text style.
InternalName Property that returns the internal name of the style. The name is the internal English name of the standard style. This name will remain constant and is not affected by locale. This name is never displayed to the user. Note that this name is not guaranteed to be unique.
InUse Property that indicates if this style is in use.
Italic Gets and sets whether the text style has italic formatting or not. True if the text style has italic formatting.
LineSpacing Gets and sets the line spacing of the text style.
LineSpacingType Gets and sets the method used to define the line spacing.
Name Gets/Sets the name of the Style.
Parent Property returning the parent of this object.
Rotation Gets and sets the rotation of the text style. The units used to define the rotation angle are radians. Currently text rotation is limited to 90 degree increments so valid values for this property are 0, pi/2, pi, and 1.5pi.
StyleLocation Property that returns the location of this style, i.e. local to the document, cached locally in the document, exists in the library. Styles that exist in the library cannot be edited.
StyleType Gets the type of the style.
Type Returns an ObjectTypeEnum indicating this object's type.
Underline Gets and sets whether the text style has underline formatting or not. True if the text style has underline formatting.
UpToDate Property that gets the up-to-date status of the style against the global repository.
VerticalJustification Gets and sets the vertical justification of the text style.
WidthScale Gets and sets the width scale factor for the text style. This is also referred to as the 'stretch factor'. A value of 1.0 will display the text as designed; a value of 0.5 will decrease the width of the text by 50%.

Accessed From

BalloonStyle.TextStyle, CustomTable.ColumnHeaderTextStyle, CustomTable.DataTextStyle, CustomTable.TitleTextStyle, DimensionStyle.TextStyle, DimensionStyle.ToleranceTextStyle, DrawingViewLabel.TextStyle, EdgeSymbolStyle.TextStyle, FeatureControlFrameStyle.TextStyle, GeneralNote.TextStyle, HoleTable.ColumnHeaderTextStyle, HoleTable.DataTextStyle, HoleTable.TitleTextStyle, HoleTableStyle.ColumnHeaderTextStyle, HoleTableStyle.DataTextStyle, HoleTableStyle.TitleTextStyle, ObjectDefaultsStyle.BorderTextStyle, ObjectDefaultsStyle.GeneralNoteStyle, ObjectDefaultsStyle.SketchedSymbolTextStyle, ObjectDefaultsStyle.SketchTextStyle, ObjectDefaultsStyle.TitleBlockTextStyle, ObjectDefaultsStyle.ViewLabelStyle, PartsList.ColumnHeaderTextStyle, PartsList.DataTextStyle, PartsList.TitleTextStyle, PartsListStyle.ColumnHeaderTextStyle, PartsListStyle.DataTextStyle, PartsListStyle.TitleTextStyle, RevisionTable.ColumnHeaderTextStyle, RevisionTable.DataTextStyle, RevisionTable.TitleTextStyle, RevisionTableStyle.ColumnHeaderTextStyle, RevisionTableStyle.DataTextStyle, RevisionTableStyle.RevisionTagTextStyle, RevisionTableStyle.TitleTextStyle, SurfaceTextureStyle.TextStyle, TableFormat.TextStyle, TableStyle.ColumnHeaderTextStyle, TableStyle.DataTextStyle, TableStyle.TitleTextStyle, TextBox.Style, TextBoxProxy.Style, TextStyles.Item, TextStylesEnumerator.Item, TransitionSymbolStyle.TextStyle, WeldSymbolStyle.TextStyle

Samples

Name Description
Sketch Text Add This sample illustrates creating text in a sketch.

Version

Introduced in version 5.3

Was this information helpful?