Text

Synopsis

This design allows the creation of a single line of text. Text is like a Rectangle whose size is a function of the text itself.

Mixins

RectangleMixin

InkTextMixin

Canonicals

Name Type Description
text string The characters to be shown.

Rules

Name Type Description
width number The total width of the characters. This overrides the width parameter of Rectangle.
height number The total height of the characters. This overrides the height parameter of Rectangle.

Example 1

Name : text_Ex01
Design : acDrawingDocument
Child Name : myText
Child Design : :Text
Name Type Supplied
Text string "Lorem"

Example 2

Name : text_Ex02
Design : acDrawingDocument
Child Name : myRectangle
Child Design : :Rectangle
Name Type Supplied
height number 1
width number 3
color string "blue"
linePattern string "Dotted"
Child Name : txtLabel
Child Design : :Text
Name Type Supplied
Text string makeString(myRectangle.DesignName)
charHeight number 0.25

Example 3

Name : text_Ex03
Design : acDrawingDocument
Child Name : myRectangle
Child Design : :Rectangle
Name Type Supplied
height number 5
width number 3
color string "jungle green"
linePattern string "Dotted"
Child Name : txtWidth
Child Design : :Text
Name Type Supplied
Text string format("width %d", myRectangle.width)
eBottom point myRectangle.eTop + Me.unitY * 0.3
charHeight number 0.5
Child Name : txtHeight
Child Design : :Text
Name Type Supplied
Text string format("width %d", myRectangle.height)
eBottom point myRectangle.eLeft + unitX * 0.3
charHeight number 0.5
xDirection vector Me.unitY
yDirection vector -Me.unitX

Example 4

Does this work in AutoCAD?

Name : text_Ex04
Design : acDrawingDocument
Child Name : myText
Child Design : :Text
Name Type Supplied
text string "Lorem"
textFont string "ariali.ttf"

Example 5

Name : text_Ex05
Design : acDrawingDocument
Child Name : myText
Child Design : :Text
Name Type Supplied
text string "~u21222"
textFont string "ariali.ttf"