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

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

VB編程操作AutoCAD導(dǎo)線型尺寸標(biāo)注

時間:2012-01-15 09:29:24 來源:未知

導(dǎo)線型尺寸標(biāo)注用來添加旁注、說明文字,創(chuàng)建導(dǎo)線型型標(biāo)注對象用AddLeader方法,語法格式如下。

RelVal=object.AddLeader(PointsArray,Annotation,Type)

下面的程序創(chuàng)建并顯示一個有箭頭的導(dǎo)線型標(biāo)注。

Private Sub Command1_Click()
    Dim leaderobj As AcadLeader
    Dim points(0 To 8) As Double
    Dim leadertype As Integer
    Dim annotationobject As AcadObject
    Dim mtextobj As AcadMText
    Dim corner(0 To 2) As Double
    Dim width As Double
    Dim text As String
    corner(0) = 0#: corner(1) = 15#: corner(2) = 0#
    width = 30
    text = "R1.5(min)"
    Set mtextobj = acadapp.ActiveDocument.ModelSpace.AddMText(corner, width, text)
    Set annotationobject = mtextobj
    points(0) = 0: points(1) = 0: points(2) = 0
    points(3) = 4: points(4) = 4: points(5) = 0
    points(6) = 4: points(7) = 5: points(8) = 0
    leadertype = acLineWidthArrow
    Set leaderobj = acadapp.ActiveDocument.ModelSpace.AddLeader(points, annotaionobject, leadertype)
    ZoomExtents
End Sub