I’ve put together a graph to collect empty drafting views for deletion and it works (I haven’t added the delete nodes yet.) but the collection method is very brute force and I’m hoping there is a smarter way to go about this.
The graph currently collects all drafting views, feeds them into Springs.Collector.ElementsInView, then compares the sublist lengths and runs a BoolMask Filter. This works because even in a view with nothing in it there is an element called ExtentElem, meaning a view with only one element in it is otherwise blank. ExtentElem isn’t really documented, doesn’t have a category or show up in the Element Types nodes. I found one or two references to it on Google, most notably a post on The Building Coder blog. I understand what he is doing but I don’t know how to deal with it in Dynamo other than querying each view for elements and somehow filtering that list.
So - is there a smarter way to go about finding empty views? In a small file it isn’t an issue, but I’m working on our typical details file which has hundreds of drafting views and it takes forever to run the graph, assuming it doesn’t just crash.
Image of the graph, the graph and a sample project file attached.