Sheet collection creation
Code
pyRevitdef create_sheet_collection(doc, name):
t = Transaction(doc, "Create Sheet Collection")
try:
t.Start()
collection = SheetCollection.Create(doc, name)
t.Commit()
return collection
except Exception as e:
if t.HasStarted():
t.RollBack()
forms.alert(
"No se pudo crear la Sheet Collection:\n\n{}".format(e),
title="Error"
)
return None