I’m not sure where I went wrong, but I’m getting some error messages I don’t quite understand.
This is what my script looks like with all the pre-fixes set.
import clr
clr.AddReference(‘RevitAPI’)
from Autodesk.Revit.DB import *
clr.AddReference(“RevitNodes”)
import Revit
clr.ImportExtensions(Revit.Elements)
clr.ImportExtensions(Revit.GeometryConversion)
clr.AddReference(“RevitServices”)
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc1 = DocumentManager.Instance.CurrentDBDocument
list = []
output = []
sheets = FilteredElementCollector(doc1).OfCategory(BuiltInCategory.OST_Sheets).ToElements()
test = []
########################
#if i.LookupParameter(‘Appears In Sheet List’).AsSTring() == ‘true’:
for i in sheets:
if i.SheetNumber.startswith(‘G’):
list.append(i)
output.append(list)
list = []
########################
for i in sheets:
if i.SheetNumber.startswith(‘H’):
list.append(i)
output.append(list)
list = []
########################
for i in sheets:
if i.SheetNumber.startswith(‘C’):
list.append(i)
output.append(list)
list = []
########################
for i in sheets:
if i.SheetNumber.startswith(‘L’):
list.append(i)
output.append(list)
list = []
########################
for i in sheets:
if i.SheetNumber.startswith(‘SD’):
list.append(i)
output.append(list)
list = []
########################
for i in sheets:
if i.SheetNumber.startswith(‘S’):
list.append(i)
output.append(list)
list = []
########################
for i in sheets:
if i.SheetNumber.startswith(‘AD’):
list.append(i)
output.append(list)
list = []
########################
for i in sheets:
if i.SheetNumber.startswith(‘A’):
list.append(i)
output.append(list)
list = []
########################
for i in sheets:
if i.SheetNumber.startswith(‘FP’):
list.append(i)
output.append(list)
list = []
########################
for i in sheets:
if i.SheetNumber.startswith(‘FA’):
list.append(i)
output.append(list)
list = []
########################
for i in sheets:
if i.SheetNumber.startswith(‘PD’):
list.append(i)
output.append(list)
list = []
########################
for i in sheets:
if i.SheetNumber.startswith(‘P’):
list.append(i)
output.append(list)
list = []
########################
for i in sheets:
if i.SheetNumber.startswith(‘MD’):
list.append(i)
output.append(list)
list = []
########################
for i in sheets:
if i.SheetNumber.startswith(‘M’):
list.append(i)
output.append(list)
list = []
########################
for i in sheets:
if i.SheetNumber.startswith(‘ED’):
list.append(i)
output.append(list)
list = []
########################
for i in sheets:
if i.SheetNumber.startswith(‘E’):
list.append(i)
output.append(list)
list = []
########################
for i in sheets:
if i.SheetNumber.startswith(‘T’):
list.append(i)
output.append(list)
list = []
########################
Out = output