AutoCAD.Text
Inherits from AutoCAD.Entity
Description
A class that encapsulates text in a DWG file.
This class is a FlexScript wrapper for the AcDbText class.
AutoCAD.Database db = AutoCAD.Database("C:\\Path\\to\\my\\file.dwg");
if (!db)
return 0;
var iter = db.getBlockTable().getAt("*Model_Space").newIterator();
for (iter.start(); !iter.done(); iter.step()) {
var ent = iter.getEntity();
if (ent.is(AutoCAD.Text)) {
var text = ent.as(AutoCAD.Text);
string textString = text.textString;
Vec3 position = text.position;
Vec3 alignmentPoint = text.alignmentPoint;
double oblique = text.oblique;
double rotation = text.rotation;
double height = text.height;
double widthFactor = text.widthFactor;
...
}
}
Properties
alignmentPoint | The alignment point of the Text. |
height | The height of the Text. Used as a scale factor for both height and width of the text. |
oblique | The oblique angle (in radians) of the Text. The angle from the text's vertical;
that is, the top of the text "slants" relative to the bottom, similar to italics . |
position | The insertion point of the Text. |
rotation | The rotation angle of the Text. This is relative to the X axis of the text's own object coordinate system (OCS). |
textString | The text string of the Text to display. |
widthFactor | The width factor of the Text. Applied to the text's width to allow the width to be adjusted independently of the height. |
Methods
create | Creates a new AutoCAD.Text object. |
Details
Do no remove, this fixes the anchor on doc.flexsim.com
Do no remove, this fixes the anchor on doc.flexsim.com
AutoCAD.Text.height
double height
Description
The height of the Text. Used as a scale factor for both height and width of the text.
Do no remove, this fixes the anchor on doc.flexsim.com
AutoCAD.Text.oblique
double oblique
Description
The oblique angle (in radians) of the Text. The angle from the text's vertical; that is, the top of the text "slants" relative to the bottom, similar to
italics
.Do no remove, this fixes the anchor on doc.flexsim.com
Do no remove, this fixes the anchor on doc.flexsim.com
AutoCAD.Text.rotation
double rotation
Description
The rotation angle of the Text. This is relative to the X axis of the text's own object coordinate system (OCS).
Do no remove, this fixes the anchor on doc.flexsim.com
Do no remove, this fixes the anchor on doc.flexsim.com
AutoCAD.Text.widthFactor
double widthFactor
Description
The width factor of the Text. Applied to the text's width to allow the width to be adjusted independently of the height.
Do no remove, this fixes the anchor on doc.flexsim.com
AutoCAD.Text.create()
AutoCAD.Text create( ) |
Returns
AutoCAD.Text | A new AutoCAD.Text object. |
Description
Creates a new AutoCAD.Text object.
var text = AutoCAD.Text.create();