Model Cleanup - Deleting views

Not all views can have a sheet number (legends, schedules, and I believe templates can be caught by the method you are using), so issues with that don’t surprise me too much. What is the error? Can you expand the watch node and find where the odd values are, and confirm that the elements causing the error do so in a consistent and understandable way?

You appear to be waiting for a view type before passing the list of element IDs through to the next tool eraser node, is this correct? Feels somewhat backwards.

If you want to use the the output of the first tool.eraser node to work with the elements which failed to delete, you may need to do some conversion. I believe that the output of this node is a list of Element Ids as a string, not Revit elements. You can confirm this with an Object.Type node. If it is than you will have to convert the IDs to elements (IDs to element in I think archilab will do that for you).


Old topic, but rather than create a duplicate topic, i’ll post this here:

I’ve written the following graph a while back to clean-up models for ‘geometry only’ sharing:
Model Share - Cleanup.dyn (106.0 KB)

The script was last saved in version Dynamo 2.0.1 and required the following costum node packages to be installed; Bimorph nodes / / Rhythm / Springs

The graph removes all scope boxes / reference lines & planes / CAD Links & Imports / Schedules. Is is controlled by toggle so that specified elements can be retained through a tick-box in dynamo player:

As Revit must always retain 1 view, the graph finds the first 3D view in the model, renames it and unticks the scope box to reveal model extents. This is to ensure the whole model is view-able when uploaded to a platform like A360 or BIM360 docs:

Lastly, the graph collects all level and grid elements and shifts them onto the workset containing the text “grids”. This is to ensure external consultants can readily turn off levels and grids by workset:

Hope it helps!


This was really helpful thank you.

Something which seems on topic is that Orchid recently added a Purge node…

Hopefully that’s of interest.


1 Like

Thanks for attention towards my package @Mark.Ackerley.
It is true that I have nodes there can replace all the nodes shown except the Bimorph link node. However, my purge node will not delete views, since this is not elements there can be “purged”. Views needs to be selected for deletion.So I am affraid that the only thing I can offer in this case is some performance issues building a more optimal graph and that is in itself not providing any new stuff to the topic :slight_smile:


@erfajo I hope you don’t mind, but I feel like your tools are more useful than they first appears to be here.

One such idea I think your package could accomplish: Saving the families out to a directory, purging unused content or content which you don’t want to share, saving the revised family, and loading it back into the project. Not sure if it’s really needed in most (any?) cases; and it’s certainly not a ‘my first dynamos’ project; but it seems doable as a result of your package.

All this is to say: Your work in this space continues to impress me and many others, providing the greater community with access to features many of us never thought possible. Thanks for that and all you do. :smiley:


thanks @JacobSmall

The issue is from 2017, so I think it is solved even it is not marked as such. It was @Andy_Grout who added something one year later, not that I understand why… I replied to @Mark.Ackerley mentioning my purge node, which in this case would it not add anything :slight_smile:

I think there is some thing there could be optimized, however, if the issue is solved and the user who put up the question is satisfied one year ago. Then I think, in this case, that I should not add any new things to it :wink:

1 Like

Hi Andy,

Do you know of any way that can strip/purge coordination models using the same technique?


I keep getting error… as per below, not sure why