When I list (using “Watch”) all elements in active view, obvious, the hidden elements are not listed. Is there a way to list the ones that are hidden? Like I’m passing “All Elements In Active View” through a boolean “false” statement to get the the list of ones that are hidden.
If you turn on show hidden elements before you run the “All elements In Active View”-node, they will be included in your list. A bit cumbersome but I don’t know any other way.
Here is a python script for separating the hidden/not hidden ones. I’ve also released a package called Element.IsHidden where the elements are sorted in hidden and not hidden.
Note that unfortunately there are a number of other ways of hiding elements that will not get picked up by the IsVisible method, e.g. element is in a hidden (sub-)category, element is hidden through use of a view filter, element is part of an invisible workset, element is outside of crop box scope etc.
Yes, I found out after i posted… Couldn’t find any thing in the API for “extracting” hidden categories though? Have you?
Not that it has anything to do with Adrian’s question, but I think the node can serve some purpose in larger projects where users have manually hidden singular objects in some views. (Just a problem that emerges now and then)
Adrian: That seems like a sound approach. Altermatively, you could toggle the view to display hidden elements (as Jostein suggested) - I think this might actually be possible using the Revit API (not sure, though).
Jostein: I just remembered I actually made a custom node called View.CategoryIsVisible a year ago that is included in package Clockwork to query the category visibility.
I have just resolved the first step of my process and I am looking way to improve it.
Perspective views are created with element select, now I should turn on the hidden ones before putting those on sheet.
This passage
show all elements in these views
could be done within Dynamo or you have pass through the Revit tools?
Other better solutions came to your head?
Second, I have not find the way to apply a template to the perspectives I am to create…maybe there is something in some personal packages, or deep in the archive (Yes in Revit it is quick and easy, but I would prefer to get them done, before handling Revit tools).
I am trying to get a count of all the hidden elements in all views I have attempted to alter the python script of Jostein’s custom node but it doesn’t seem to be working for me. Can anyone help.
Some tricks:
element.IsHidden catches things hidden by category, by element and even for Rooms and elements not able to be shown due to Phase settings of a view, but it does NOT catch elements that are not visible in a view due to Design Option settings.
element.get_boundingbox(view) is another good universal catch, but it’s a slow operation, and it also doesn’t catch elements that are not visible by design option settings.
element.IsHidden also doesn’t catch elements in linked models that are not visible due to the WorkSet not visible. Check Workset.IsVisible() for this.
My main issue now is that nothing I can find catches if an element is not visible due to Design Option settings, and the Design Option settings for a View are not accessible as far as I can find for a View with RevitAPI. Kind of screwed here unless using CustomExporter. What I want to know is what CustomExporter does that catches everything in the View, and why don’t we have access to all of these methods with RevitAPI?