Creates a rectangular array.
Syntax
objectVariable = object.ArrayRectangular(NumberOfRows, NumberOfColumns, [NumberOfLevels], GapBetweenRows, GapBetweenColumns, [GapBetweenLevels])
Where:
object is one of the ModelSpace or PaperSpace collection objects or a Block object;
NumberOfRows is the number of rows (horizontal elements) in the array;
NumberOfColumns is the number of rows (vertical elements) in the array;
NumberOfLevels is the number of levels in a 3D array;
GapBetweenRows is the distance between rows. A positive number causes the array to be built to the right of the source object, while a negative number causes the array to be built to the left.
GapBetweenColumns is the distance between rows. A positive number causes the array to be built upward, while a negative number causes the array to be built downward.
GapBetweenLevels is the distance between levels. A positive number causes the array to be expanded in the positive direction, while a negative number causes the array to be expanded in a negative direction.
ArrayRectangular method example
Sub Example_ArrayRectangular()
' This example creates a line and a rectangular array based on that line.
Dim myLine As CADopia.Line
Set myDoc = Application.ActiveDocument
Set myLine = myDoc.ModelSpace.AddLine(Library.CreatePoint(4, 2), Library.CreatePoint(7, 2))
myLine.Update
ThisDocument.ActiveViewport.ZoomExtents
' Create a 4x3 array of an object.
Dim retObj As Variant
Set retObj = myLine.ArrayRectangular(4, 3, 1, 3, 2, 2)
retObj.Update
ThisDocument.ActiveViewport.ZoomExtents
MsgBox "Rectangular array constructed."
End Sub
Comments