VB编程操作AutoCAD导线型尺寸标注

导线型尺寸标注用来添加旁注、说明文字,创建导线型型标注对象用AddLeader方法,语法格式如下。

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

下面的程序创建并显示一个有箭头的导线型标注。

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值