根据给定的坐标数组创建三维折线。 支持的平台:仅窗口 签名工 务 局: RetVal = object.Add3Dpoly(PointsArray) 言论若要闭合折线,请在对象上使用属性。Closed3DPolyline 例子工 务 局: 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 Visual 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-1-8 19:22
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.