Selecting only active sheets in a list

Hello,

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.

Any thoughts?

Thanks,

Chris

Hey @ckelusak please post your working in progress to make it easier for others to help you.

Also, if you haven’t, take a look at these suggestions about how to ask for help,
and welcome to the forum!

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

ignore the text in the orange group. I coped those nodes from one of my scripts.

Thanks Everyone!! I will post the code snip and screenshot as soon as I can and will try what was suggested!!

Thanks again,

Chris

@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.

Will post the Image when I get more organized!

Thanks so much!

Chris

This is what I got working, still doing some matching of data but all good otherwise! Thanks everyone