急求用在cad的二次开发中,用vbA语言画圆弧的程序!!! 25
3个回答
展开全部
thisdrawing.modelspace.addarc()
thisdrawing.sendcommand ""
Sub arc1()
For i = 1 To 99
ThisDrawing.SendCommand "c" & vbCr & "2p" & vbCr & i & "," & i & vbCr & i + 1 & "," & i + 1 & vbCr
Next i
End Sub
Sub arc2()
Dim p(2) As Double
For i = 1.5 To 99.5
p(0) = i: p(1) = i: p(2) = 0
ThisDrawing.ModelSpace.AddCircle p, Sqr(2) / 2
Next i
End Sub
thisdrawing.sendcommand ""
Sub arc1()
For i = 1 To 99
ThisDrawing.SendCommand "c" & vbCr & "2p" & vbCr & i & "," & i & vbCr & i + 1 & "," & i + 1 & vbCr
Next i
End Sub
Sub arc2()
Dim p(2) As Double
For i = 1.5 To 99.5
p(0) = i: p(1) = i: p(2) = 0
ThisDrawing.ModelSpace.AddCircle p, Sqr(2) / 2
Next i
End Sub
展开全部
不知道你的R=?、center=?
希望可以帮到你
Sub arc_()
Dim arcobj As AcadArc
Dim center(0 To 2) As Double
Dim r As Double
Dim stangle As Double
Dim edangle As Double
center(0) = 0: center(1) = 0: center(2) = 0
r = 100
stangle = 45 * 3.14 / 180
edangle = 135 * 3.14 / 180
Set arcobj = ThisDrawing.ModelSpace.AddArc(center, r, stangle, edangle)
arcobj.Update
ThisDrawing.Application.ZoomExtents
End Sub
如果你说的是编辑多段线的凹度或凸度,需要用另一种方法。
希望可以帮到你
Sub arc_()
Dim arcobj As AcadArc
Dim center(0 To 2) As Double
Dim r As Double
Dim stangle As Double
Dim edangle As Double
center(0) = 0: center(1) = 0: center(2) = 0
r = 100
stangle = 45 * 3.14 / 180
edangle = 135 * 3.14 / 180
Set arcobj = ThisDrawing.ModelSpace.AddArc(center, r, stangle, edangle)
arcobj.Update
ThisDrawing.Application.ZoomExtents
End Sub
如果你说的是编辑多段线的凹度或凸度,需要用另一种方法。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
你想怎么画?2点+R? 3点? 1点+R?
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询