rectangular array help

rectangular array help

Anonymous
Not applicable
772 Views
5 Replies
Message 1 of 6

rectangular array help

Anonymous
Not applicable
i am trying to create a rectangular array of a line in autocad 2000, using visual studio 2005 express addition.
all i have done is taken the sample code from the autocad 2000 help files, and modified it a bit. here is the code i have done:
' Define the rectangular array
Dim numberOfRows As Double
Dim numberOfColumns As Double
Dim numberOfLevels As Double
Dim distanceBwtnRows As Double
Dim distanceBwtnColumns As Double
Dim distanceBwtnLevels As Double
numberOfRows = Label49.Text
numberOfColumns = 1
numberOfLevels = 0
distanceBwtnRows = Label48.Text
distanceBwtnColumns = 1
distanceBwtnLevels = 0

' Create the array of objects
Dim retObj As Object
retObj = lineObj2.ArrayRectangular _
(numberOfRows, numberOfColumns, numberOfLevels, _
distanceBwtnRows, distanceBwtnColumns, distanceBwtnLevels)

it seems to want to work, as i have no errors, but at runtime i get this error:
COMException was unhandled

Invalid argument numRows or numCols or numLvls in ArrayRectangular method
0 Likes
773 Views
5 Replies
Replies (5)
Message 2 of 6

Anonymous
Not applicable
Not tested, but at the first glance these variables
must be as Integers

Dim numberOfRows As Integer
Dim numberOfColumns As Integer
Dim numberOfLevels As Integer

~'J'~
0 Likes
Message 3 of 6

Anonymous
Not applicable
i changed those items to integer, but i still got the same error.
0 Likes
Message 4 of 6

Anonymous
Not applicable
I believe the numberofLevels needs to be at least 1.

wrote in message news:[email protected]...
i changed those items to integer, but i still got the same error.
0 Likes
Message 5 of 6

Anonymous
Not applicable
I think VS2005 should't work with A2000
You need the earlier version of Visual Studio
for it
IMO

~'J'~
0 Likes
Message 6 of 6

Anonymous
Not applicable
No.
0 Likes