<Code Lib>
👍 1 👁 6

Sheet collection creation

by @EndiRos · Aug 19, 2026

Code

pyRevit
def 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
guest@rvtdocs: ~/discuss

Want to join the conversation?

rvtdocs auth

Share & save code Comment on pages Save bookmarks Upvote snippets Gamification

Loading…