挿入点と境界ボックスの幅によって定義された矩形の中に、マルチ テキスト図形を作成します。
サポートされているプラットフォーム: Windows のみ
VBA:
RetVal = object.AddMText(InsertionPoint, Width, Text)
タイプ: Block、ModelSpace、PaperSpace
このメソッドが適用されるオブジェクト。
アクセス: 入力のみ
タイプ: バリアント型(3 要素の倍精度浮動小数点数型配列)
マルチ テキスト境界ボックスの挿入点。
アクセス: 入力のみ
タイプ: 倍精度浮動小数点数型
マルチ テキスト境界ボックスの幅。
アクセス: 入力のみ
タイプ: 文字列
MText オブジェクトに実際に入力されるテキスト文字列。
追加の注意はありません。
VBA:
Sub Example_AddMtext()
' This example creates an MText object in model space.
Dim MTextObj As AcadMText
Dim corner(0 To 2) As Double
Dim width As Double
Dim text As String
corner(0) = 0#: corner(1) = 10#: corner(2) = 0#
width = 10
text = "This is the text String for the mtext Object"
' Creates the mtext Object
Set MTextObj = ThisDrawing.ModelSpace.AddMText(corner, width, text)
ZoomAll
End Sub
Visual LISP:
(vl-load-com)
(defun c:Example_AddMtext()
;; This example creates an MText object in model space.
(setq acadObj (vlax-get-acad-object))
(setq doc (vla-get-ActiveDocument acadObj))
;; Define the multiline text object
(setq corner (vlax-3d-point 0 10 0)
width 10
text "This is the text String for the mtext Object")
;; Creates the mtext Object
(setq modelSpace (vla-get-ModelSpace doc))
(setq MTextObj (vla-AddMText modelSpace corner width text))
(vla-ZoomAll acadObj)
)