HIde element in all other views

I’m trying to hide an element in all inactive views. I have had this script running before but I’m trying to use the Spring package to make things happen in a more immediate, user-friendly way using the dynamo player. Here is the script I’m currently running and it keeps returning a Traceback error. Any idea what I might be doing wrong? Any help is greatly appreciated.

Mike

Do some research on what is in the views category, you’ll be surprised what you’'ll find.
(hint: project browser is a view).

Hi @mcobb
Try filter from your elements (views) the views that aren’t views template.
Cheers

1 Like

Thanks for the advice. You are right. There are more views to reckon with than I anticipated. For some reason, after starting up Dynamo and Revit again, the routine now seems to be working, so I guess I’m halting my efforts (and my understanding of tracebacks) here. I’m attaching the Dynamo file here as well for you (and others) possible use.

I have read plenty of posts on this subject, hiding elements and know many people feel that view template should be used instead of this more piecemeal approach of simply hiding things en masse. For my part, the reason for it stems primarily from select detail and sections callouts that I only want visible in one or two selected views.

With this file, you should be able to select a few elements in a selected view and hit the play button in the Dynamo Player. It should hide those elements in every other view. Maybe it will help you someday like I am hoping it will help me to save time. Cheers. Mike

Hide Element(s) in All Other Views.dyn (17.1 KB)

Exactly what version of Spring package are you using for that script? I’ve downloaded your script but it gives me 2 errors: “Custom node definition not loaded” on the Clear List and View.HideElements.