我想看一级黄色大片_久久亚洲国产精品一区二区_久久精品免视看国产明星_91久久青青青国产免费

您的位置:網(wǎng)站首頁 > CAD新聞

AutoVBA在繪圖空間創(chuàng)建直線對象

時間:2012-02-01 08:28:32 來源:未知

AutoVBA在繪圖空間創(chuàng)建LINE對象,代碼如下。

Public Sub creatline()
    Dim mylineobject As AcadLine
    Dim startpoint(0 To 2) As Double
    Dim endpoint(0 To 2) As Double
    startpoint(0) = 1
    startpoint(1) = 3
    startpoint(2) = 2
    endpoint(0) = 4
    endpoint(1) = 5
    endpoint(2) = 4
    Set mylineobject = ThisDrawing.ModelSpace.AddLine(startpoint, endpoint)
End Sub

代碼完。

定義一個創(chuàng)建直線的函數(shù),指定起點和終點,然后將其添加到繪圖空間。


相關(guān)文章