Unused Revit System Viewports

Unused Revit System Viewports

jbish1
Contributor Contributor
1,521 Views
7 Replies
Message 1 of 8

Unused Revit System Viewports

jbish1
Contributor
Contributor

I know this is probably a wishlist item, but here is the question anyway:

 

Is there a way to delete unused System Viewport Types from a project?  I'm talking about System Viewport types that show up in the Type Selector that have no Sheet Views or Schedules utilizing them.  They do not show up in the RevitLookup tool.  They do not show up in DBLink.  They DO show up in Ideate BIMLink though!... Unfortunately, BIMLink doesn't allow deletion, only renaming.  I have found no way to access these System Viewport Types in the API.  See attached...

0 Likes
1,522 Views
7 Replies
Replies (7)
Message 2 of 8

jeremytammik
Autodesk
Autodesk

Afaik, absolutely all elements are listed by RevitLookup with no exception.

 

Therefore, I believe you are mistaken when you say that they are not listed.

 

I suggest the following approach:

 

  • Create a new project.
  • Use the element lister to list all elements and save that list as A.
  • Do whatever you need to do to create an unused viewport.
  • Use the element lister to list all elements and save that list as B.
  • The unused viewport is part of the difference C = B-A.
  • Explore C in detail, element by element, and you will find your unused viewport.
  • Use RevitLookup or other, more intimate exploration tools to determine a way to identify all unused viewports.
  • Create an element filter to retrieve them.
  • Nuke'em.

 

Research -- http://thebuildingcoder.typepad.com/blog/2017/01/virtues-of-reproduction-research-mep-settings-ontol...

 

More research -- http://thebuildingcoder.typepad.com/blog/2013/11/intimate-revit-database-exploration-with-the-python...

 

Please let us know how you end up solving this, so we can add it to the list of purge techniques:

 

http://thebuildingcoder.typepad.com/blog/2017/04/forgefader-ui-lookup-builds-purge-and-room-instance...

 

Thank you!

 

Cheers,

 

Jeremy

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 3 of 8

jbish1
Contributor
Contributor
Hi Jeremy!

I used a different approach. I listed the offending using BIMLink, got their element unique identifier, did Select by ID, and deleted them. Lost some placekeeper sheets and schedules. Recreated those with Viewport 1 as the default

I'd like to know how I would have found them in RevitLookup though

V/R
0 Likes
Message 4 of 8

jeremytammik
Autodesk
Autodesk

Dear James,

 

You can use Select by Id to make them current and then use Snoop current selection in RevitLookup to analyse their properties and relationships.

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 5 of 8

jbish1
Contributor
Contributor

Based on still not being able to make changes via the API, I cannot 'Accept as Solution'.  Why would System Viewport definitions be applied to anything except an actual Viewport?  When I deleted the offending, I deleted several schedules and several Sheets that didn't even have any Viewports on them!  A System Viewport Definition does not expose itself on the Properties pane of a Schedule, or a Sheet (only a Viewport on a Sheet).  I have still found no way to access a Viewpoint property on a Schedule or a Sheet with no Viewports on it via the API.

Message 6 of 8

Admin.CTI
Contributor
Contributor

Same here, this is a weird behavior in Revit, i have searched a lot and have not found an answer, not even "This is a known Revit bug".

0 Likes
Message 7 of 8

sragan
Collaborator
Collaborator

I just asked about purging view types last week. Someone said the Pyrevit addin has some additional tools including one that allows deleting these extra types.  However, I haven't had a chance to confirm it.


From one test I did, I do believe these can be deleted.  But something in the revit file is using them.  Maybe sheets, or maybe views that aren't even placed on a sheet.  But I found if I deleted all sheets, views, and schedules, and purged, purged, purged until everything was gone, it did delete all the extra view types.

  

 

0 Likes
Message 8 of 8

jbish1
Contributor
Contributor

I used Pyrevit

0 Likes