Model Cleanup - Deleting views

Hey all,

I created a “delete all unused views” tool a while back and it works great. I would like to take it a step further and delete any views that don’t have a reference symbol or plane. I ultimately want to delete everything I can without losing anything that was modeled. I could really use some direction from the Dynamo community.

That would mean deleting all views (except one.) But you’re saying you want to keep certain views?

Yeah I just want to keep views that have a reference symbol or plane

I mean you could technically search all views for those element types but that’s going to be clunky and really slow.

Yeah, we a looking at options for our firm. I have made a “delete all sheets” and “delete unused views”. In Dynamo, is it possible to combine these two tools to perform the tasks I want?

Could you post of screenshot of your graph?

Which one?


Possibly. You can definitely combine them into one graph by just pasting the do parts together.

Do they have to link together?

Can you also list your reference planes or symbols in Dynamo?

Nope! You can have multiple scripts running alongside each other in the same graph.

Oh sweet! great to know!

Is there a way to specify “do this first, then do this”?

You can use the transaction nodes or a wait node (Springs, BattleBIM, and other packages have these). Transaction nodes are out of the box but split your graph into two functions. I prefer wait nodes.

Awesome! Much Mahalo!

So the BattleBIM package “Wait” node - Would I set it up like this? (See Image)
image

Sorry, I guess that one doesn’t do what I thought it did. It actually waits for n seconds.

This is how the Springs node works.


You can even create your own wait node.
Dynamo nodes are executed in their connected order (eg. a node will not run until all its inputs have been run.) So the way to force one node (or group of nodes) to run after another is to make the second node depend on an input from the first node.

Even something as simple as combining the first output with the second input will make sure that your second set of nodes runs after the first set is complete.

1 Like

Sweet! I think I got it to work. So I installed the Springs package and it didn’t appear to have the wait node. I did find “Passthrough” in the Clockwork package and that seemed to work BUT I got warnings when I ran the tool.