Creates a single line
of text.
Signature
VBA: RetVal =
object.AddText(TextString, InsertionPoint, Height)
VL : RetVal = (vla-AddText
object TextString InsertionPoint Height)
(vla-AddText mspace thestring
(vlax-3d-point apt) ht)
-
Object : ModelSpace
Collection, PaperSpace Collection, Block
The object or objects this method applies to.
-
TextString :
String; input-only
The actual text to be displayed.
-
InsertionPoint :
Variant (three-element array of doubles); input-only
The 3D WCS coordinates on the drawing where the text is placed.
-
Height : Double;
input-only
The height of the text. Must be a positive number.
-
RetVal : Text
object
The newly created Text object.
Example :
(defun c:al-addText ()
(vl-load-com)
(setq mspace (vla-get-modelspace
(vla-get-activedocument
(vlax-get-acad-object))))
(setq apt (getpoint "\nInsertion Point: "))
(setq thestring (getstring T "\nText : "))
(setq ht (getreal "\nHeight : "))
(setq thetext (vla-AddText mspace thestring
(vlax-3d-point apt) ht))
(princ)
);defun
|
|