Deleting Unused Elevations and Sections

I am trying to delete unused elevations first then delete unused sections
I followed this link and it deletes all of the elevations not just the unused. (placed on sheets) The code seems correct but I must be missing something

Thanks in advanceHome.dyn (7.0 KB)

If I am stuck on the Elevations then the Sections will be worse. Thanks as always in advance

You should check the two Parameters associated with a view being on a sheet.

Edit: Not sure why the BIP aren’t working correctly, but they kept giving me NonType errors so I resorted to LookupParameter in stead. This however gives different results for the two different parameters if they are “null” or None.

If either of these have a value then it is placed.

1 Like

That worked perfect. I just removed the used out of the output and ran the delete. Thanks for pointing me in the right direction (Pretty much did it for me lol) Now on to the sections for me

I keep trying to make it delete sections in the same way but keep getting errors. I guess sections are different than elevations.

OK went in another direction and got it to work here is my solution. I had to add in another one for callouts because revit even though it is a section it is for a detail view not section lol

I could also add in elevations to the python as well and do a 1 stop shop lol
Thanks again for the help

1 Like