AddMtext Method

Back to Methods Reference

Creates an MText entity in a rectangle defined by the insertion point and width of the bounding box.

Signature

VBA : RetVal = object.AddMText(InsertionPoint, Width, Text)

VL : RetVal = (vla-AddMtext object InsertionPoint Width Text)

(vla-AddMText mspace (vlax-3d-point apt) wt thestring)

  • Object : ModelSpace Collection, PaperSpace Collection, Block
    The object or objects this method applies to.

  • InsertionPoint : Variant (three-element array of doubles); input-only
    The insertion point of the mtext bounding box.

  • Width : Double; input-only
    The width of the mtext bounding box.

  • Text : String; input-only
    The actual text string for the MText object.

  • RetVal : MText object
    The newly created MText object.

Example :


(defun c:al-addMText ()

(vl-load-com)

(setq mspace (vla-get-modelspace 
                 (vla-get-activedocument 
                      (vlax-get-acad-object))))

(setq apt (getpoint "\nInsertion Point: "))

(setq wt (getdist  apt "\nWidth : "))

(setq thestring (getstring T "\nText : "))

(setq theMText (vla-AddMText mspace (vlax-3d-point apt) wt thestring))

(princ)

);defun

 
The AutoLisp/Visual Lisp/VBA Resource Website
Google
Search the WWW Search AfraLisp

Copyright © 1999-Perpetuity by AfraLisp

All rights reserved.
Information in this document is subject to change without notice.
Site created and maintained by Kenny Ramage

The AutoLisp/Visual Lisp/VBA Resource Website