您的位置:网站首页 > CAD新闻

VB编程操作AutoCAD角度型尺寸标注

时间:2012-01-15 09:31:55 来源:未知

角度型尺寸标注用来标注两条直线或三个点之间的角度,创建角度型尺寸标注对象AddDimAngular方法,语法格式如下。

RetVal=object.AddDimangular(AngleVertex,FirstEndPoint,SecondEndPoint,TextPoint)

下面的代码创建一个角度型标注对象。

Private Sub Command1_Click()
    Dim angvert(0 To 2) As Double
    Dim firstpoint(0 To 2) As Double
    Dim secondpoint(0 To 2) As Double
    Dim textpoint(0 To 2) As Double
    angvert(0) = 0#: angvert(1) = 5#: angvert(2) = 0#
    firstpoint(0) = 1#: firstpoint(1) = 6#: firstpoint(2) = 0#
    secondpoint(0) = 1#: secondpoint(1) = 3#: secondpoint(2) = 0#
    textpoint(2) = 20#: textpoint(1) = 5#: textpoint(2) = 0#
    Set dimobj = acadapp.ActiveDocument.ModelSpace.AddDimAngular(angvert, firstpoint, secondpoint, textpoint)
    ZoomExtents
End Sub