I am looking for a little help with sheet list management in Dynamo.
Currently, our template has ~350 sheets, many of which are placeholder sheets, I am trying to gather data from only active sheets in the project.
I have tried to match the index items to another list which was generated to see if a sheet had a view on it and contains null values as well as the view info. As well as tried to pull from the IsPlaceholder parameter as well as the Appears in Sheet list Parameter. All with no luck.
Hi, little tip: there is a node called Sheet.Views which returns if a sheet is empty or not. Update: and another one called TitleblockFromSheet in case there’s nothing but titleblocks on your sheets…
I am not sure where I picked up this bit of code. Sorry to whom ever wrote it and feel free to accept credit because it has been a huge help to me. This will solve all your problems (or should at least).
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
#The inputs to this node will be stored as a list in the IN variables.
dataEnteringNode = IN
sheets = UnwrapElement(IN[0])
toDelete = []
for s in sheets:
if s.IsPlaceholder:
toDelete.append(s)
OUT = toDelete
@Steven_Hansen Did some modifications to what you have here to work with my workflow and it works great!! I was looking into IsPlaceholder yesterday but wasn’t sure on the rest of the script so it helps a ton.