Add3DPoly 方法 (ActiveX)
从给定的坐标数组创建 3D 折线。 支持的平台:仅限 Windows 签名VBA: RetVal = object.Add3Dpoly(PointsArray) 言论若要关闭折线,请使用对象上的属性。Closed3DPolyline 例子VBA: Sub Example_Add3DPoly()
Dim polyObj As Acad3DPolyline
Dim points(0 To 8) As Double
' Create the array of points
points(0) = 0: points(1) = 0: points(2) = 0
points(3) = 10: points(4) = 10: points(5) = 10
points(6) = 30: points(7) = 20: points(8) = 30
' Create a 3DPolyline in model space
Set polyObj = ThisDrawing.ModelSpace.Add3DPoly(points)
ZoomAll
End Sub
可视化 LISP: (vl-load-com)
(defun c:Example_Add3DPoly()
;; This example creates a 3 segment 3D polyline in model space.
(setq acadObj (vlax-get-acad-object))
(setq doc (vla-get-ActiveDocument acadObj))
;; Create the array of points
(setq points (vlax-make-safearray vlax-vbDouble '(0 . 8)))
(vlax-safearray-fill points '(0 0 0
10 10 10
30 20 30
)
)
;; Create a 3D polyline in model space
(setq modelSpace (vla-get-ModelSpace doc))
(setq polyObj (vla-Add3DPoly modelSpace points))
(vla-ZoomAll acadObj)
)
|
|Archiver|CAD开发者社区
( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2025-11-3 06:03
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.