阵列 核心代码如下:
先要设置Set lineobj和Set lineobj1(即画线) 然后,
'偏移直线 Dim offsetobj As Variant offset = 4500 offsetobj = lineobj1.offset(offset) '定义矩形阵列 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 = 4 numberofcolumns = 4
numberoflevels = 1 distancebwtnrows = 4
distancebwtncolumns = 4
distancebwtnlevels = 1 '创建对象阵列 Dim retobj As Variant retobj = lineobj.ArrayRectangular(numberofrows, 1, 1, distancebwtnrows, 1, 1) retobj = lineobj1.ArrayRectangular(1, numberofcolumns, 1, 1, distancebwtncolumns, 1)
ZoomAll |