线条是 AutoCAD 中最基本的对象。您可以创建各种线 - 单线以及带和不带圆弧的多线段。 通常,通过指定坐标点来绘制线条。默认线型为 CONTINU,即一条不间断的线,但可以使用点和虚线的各种线型。 若要创建行,请使用下列方法之一:
标准线和多线在世界坐标系的XY平面上创建。折线和轻量级折线在对象坐标系 (OCS) 中创建。 创建折线对象此示例使用该方法使用 2D 坐标 (2,4)、(4,2) 和 (6,4) 创建简单的两段折线。AddLightweightPolyline Sub Ch4_AddLightWeightPolyline() Dim plineObj As AcadLWPolyline Dim points(0 To 5) As Double ' Define the 2D polyline points points(0) = 2: points(1) = 4 points(2) = 4: points(3) = 2 points(4) = 6: points(5) = 4 ' Create a light weight Polyline object in model space Set plineObj = ThisDrawing.ModelSpace.AddLightWeightPolyline(points) ThisDrawing.Application.ZoomAll End Sub |
|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 )
GMT+8, 2024-6-10 18:29
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.