AutoCAD 画圆的VBA代码
我想在AutoCAD里用VBA来控制画一个圆:直径10,坐标(0,0,0)。这里就想请各位高人给一段以上的VBA代码。十分感谢!...
我想在AutoCAD里用VBA来控制画一个圆:直径10,坐标(0,0,0)。这里就想请各位高人给一段以上的VBA代码。十分感谢!
展开
1个回答
展开全部
VBA帮助上就有的,很简单:
Sub Example_AddCircle()
Dim circleObj As AcadCircle
Dim centerPoint(0 To 2) As Double
Dim radius As Double
centerPoint(0) = 0#: centerPoint(1) = 0#: centerPoint(2) = 0#
radius = 5# '#半径5
Set circleObj = ThisDrawing.ModelSpace.AddCircle(centerPoint, radius)
ZoomAll
End Sub
Sub Example_AddCircle()
Dim circleObj As AcadCircle
Dim centerPoint(0 To 2) As Double
Dim radius As Double
centerPoint(0) = 0#: centerPoint(1) = 0#: centerPoint(2) = 0#
radius = 5# '#半径5
Set circleObj = ThisDrawing.ModelSpace.AddCircle(centerPoint, radius)
ZoomAll
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询