点の配列を通るマルチラインを作成します。
サポートされているプラットフォーム: Windows のみ
VBA:
RetVal = object.AddMLine(VertexList)
タイプ: Block、ModelSpace、PaperSpace
このメソッドが適用されるオブジェクト。
アクセス: 入力のみ
タイプ: バリアント型(倍精度浮動小数点数型配列)
マルチラインの頂点を指定する 3D WCS 座標の配列。
追加の注意はありません。
VBA:
Sub Example_AddMLine()
' This example adds an Mline in model space
Dim mLineObj As AcadMLine
Dim vertexList(0 To 17) As Double
' Define data for new object
vertexList(0) = 4: vertexList(1) = 7: vertexList(2) = 0
vertexList(3) = 5: vertexList(4) = 7: vertexList(5) = 0
vertexList(6) = 6: vertexList(7) = 7: vertexList(8) = 0
vertexList(9) = 4: vertexList(10) = 6: vertexList(11) = 0
vertexList(12) = 5: vertexList(13) = 6: vertexList(14) = 0
vertexList(15) = 6: vertexList(16) = 6: vertexList(17) = 6
' Create the line in model space
Set mLineObj = ThisDrawing.ModelSpace.AddMLine(vertexList)
ThisDrawing.Application.ZoomAll
MsgBox "A new MLine has been added to the drawing."
End Sub
Visual LISP:
(vl-load-com)
(defun c:Example_AddMLine()
;; This example adds an Mline in model space
(setq acadObj (vlax-get-acad-object))
(setq doc (vla-get-ActiveDocument acadObj))
;; Define data for new object
(setq vertexList (vlax-make-safearray vlax-vbDouble '(0 . 17)))
(vlax-safearray-fill vertexList '(4 7 0
5 7 0
6 7 0
4 6 0
5 6 0
6 6 0
)
)
;; Create the line in model space
(setq modelSpace (vla-get-ModelSpace doc))
(setq mLineObj (vla-AddMLine modelSpace vertexList))
(vla-ZoomAll acadObj)
(alert "A new MLine has been added to the drawing.")
)