如下面的阵列程序,如何设定装载及设定快捷命令 1)、如在CAD里输入C就是画圆,我能不能设定下列的程序,在CAD里输入AA就是执行下面的程序 2)、如何在VBA中获得鼠标点击的坐标 Sub Ch4_ArrayRectangularExample() ' 创建圆 Dim circleObj As AcadCircle Dim center(0 To 2) As Double Dim radius As Double center(0) = 2#: center(1) = 2#: center(2) = 0# radius = 0.5 Set circleObj = ThisDrawing.ModelSpace. _ AddCircle(center, radius) ZoomAll ' 定义矩形阵列 Dim numberOfRows As Long Dim numberOfColumns As Long Dim numberOfLevels As Long Dim distanceBwtnRows As Double Dim distanceBwtnColumns As Double Dim distanceBwtnLevels As Double numberOfRows = 5 numberOfColumns = 5 numberOfLevels = 2 distanceBwtnRows = 1 distanceBwtnColumns = 1 distanceBwtnLevels = 1 ' 创建对象的阵列 Dim retObj As Variant retObj = circleObj.ArrayRectangular _ (numberOfRows, numberOfColumns, numberOfLevels, _ distanceBwtnRows, distanceBwtnColumns, distanceBwtnLevels) ZoomAll End Sub |