Message 1 of 6
rectangular array help
Not applicable
11-25-2007
11:08 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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
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