Create and Modify Text Styles

New text inherits height, width factor, obliquing angle, and text generation properties from the current text style. To create a text style, use the Add method to create a new TextStyle object and add it to the TextStyles collection. The Add method takes a TextStyle name as input. Once created, you cannot change the name of a text style through AutoCAD ActiveX Automation.

Style names can contain letters, numbers, and the special characters dollar sign ($), underscore (_), and hyphen (-). AutoCAD converts the characters to uppercase. If you don't enter a style name, AutoCAD automatically names the style Stylen, where n is a number that starts at 1. Each new style is shown in increments of 1.

You can modify an existing style by changing the properties of the TextStyle object. You can also update existing text of that style type to reflect the changes. Use the following properties to modify a TextStyle object:


Specifies the file associated with a font (character style).


Specifies the special shape definition file used for a non-ASCII character set.


Specifies the character height.


Specifies the expansion or compression of the characters.


Specifies the slant of the characters.


Specifies backward text, upside-down text, or both.

If you change an existing style's font or orientation, all text using that style is changed to use the new font or orientation. Changing text height, width factor, and oblique angle does not change existing text but does change subsequently created text objects.

NoteYou must call the Regen or Update method to see any changes to the above properties.