从顶点列表创建轻量级折线。 支持的平台:仅窗口 签名工 务 局: RetVal = object.AddLightWeightPolyline(VerticesList) 言论顶点指定构成折线的线段的端点。要添加弧段,请先创建包含所有线段的折线,然后向要成为弧的各个线段添加凸起。若要向段添加凸起值,请使用该方法。SetBulge 折线的高程将设置为布局的当前高程。使用理论属性确定折线的高程。ElevationModelspaceElevationPaperspace 可以使用该方法将坐标与OCS相互转换。TranslateCoordinates 例子工 务 局: Sub Example_AddLightWeightPolyline() ' This example creates a lightweight polyline in model space. Dim plineObj As AcadLWPolyline Dim points(0 To 9) As Double ' Define the 2D polyline points points(0) = 1: points(1) = 1 points(2) = 1: points(3) = 2 points(4) = 2: points(5) = 2 points(6) = 3: points(7) = 2 points(8) = 4: points(9) = 4 ' Create a lightweight Polyline object in model space Set plineObj = ThisDrawing.ModelSpace.AddLightWeightPolyline(points) ZoomAll End Sub Visual LISP: (vl-load-com) (defun c:Example_AddLightWeightPolyline() ;; This example creates a lightweight polyline in model space. (setq acadObj (vlax-get-acad-object)) (setq doc (vla-get-ActiveDocument acadObj)) ;; Define the 2D polyline points (setq points (vlax-make-safearray vlax-vbDouble '(0 . 9))) (vlax-safearray-fill points '(1 1 1 2 2 2 3 2 4 4 ) ) ;; Create a lightweight Polyline object in model space (setq modelSpace (vla-get-ModelSpace doc)) (setq plineObj (vla-AddLightWeightPolyline modelSpace points)) (vla-ZoomAll acadObj) ) |
|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2025-1-8 19:41
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.