Greetings,
It appears as if there is in fact a limit of 256 layout tabs in a drawings. Is this true? My test seems to confirm this. I wrote VBA code to produce 350 layouts. An error message was displayed when it tried to make the 257th - "Maximum number of layouts exeeded" - error number -2145386170. I thought it may just be a VBA restriction so I went to the command line and tried to make a new layout:
Command:
-LAYOUT
Enter layout option [Copy/Delete/New/Template/Rename/SAveas/Set/?] <set>: n
Operation cancelled, maximum number of layouts (256) would be exceeded.
Command:
-LAYOUT
Enter layout option [Copy/Delete/New/Template/Rename/SAveas/Set/?] <set>: c
Operation cancelled, maximum number of layouts (256) would be exceeded.
Here is the code:
Code:
Sub Test()
Dim Int1 As Integer
Dim AcLyOut1 As AcadLayout
Dim AcBlk1 As AcadBlock
Dim AcCirc1 As AcadCircle
Dim Pnt1(0 To 2) As Double
Pnt1(0) = 0#: Pnt1(1) = 0#: Pnt1(2) = 0#
For Int1 = 1 To 350
Err.Clear
On Error Resume Next
Set AcLyOut1 = ThisDrawing.Layouts.Add(CStr(Int1))
If Err <> 0 Then
MsgBox Err.Description
MsgBox Err.Number
End If
Set AcBlk1 = AcLyOut1.Block
Set AcCirc1 = AcBlk1.AddCircle(Pnt1, 20#)
ThisDrawing.ActiveLayout = AcLyOut1
ZoomExtents
Next
End Sub
We do Civil. Some municipal authorities require a drawing for each stand in proposed developments. There are typically well over 300 plus stands in the jobs we take on. I was hoping to have one drawing file for the project, using a layout for each stand. But it looks like this is not possible due to the limit of available layouts in AutoCAD. OR.. Is there a way to expand the limit?
TIA...
Kevin.