This compares the Drawing Index (Schedule) with all sheets, including placeholders, and deletes sheets not found in the Drawing Index. The only items that may need changing are the Drawing Index name, and the column index that is used for the sheet number. You will need the BimorphNodes package.
The one thing I would change about this workflow is to use the delete node from Springs since it requires a true bool to run. Not having that ability makes me a little scared at times. But, awesome workflow!
I’ve updated it with your suggestion. Seems to work just fine after a few trials.
Now BimorphNodes and spring nodes packages are required.
One more suggestion: Change the Categories selection to a combination of a String and Category.ByName. This helps insulate the script from version updates in Revit (like when Revit 2019 introduced a whole slew of new categories).
New update…(first two nodes replaced Category node)
Patrick kindly grouped the script and added custom node names to clarify workflow logic.
Now it’s perfect!