mandag 5. januar 2015

Element.IsHidden

Came across a question on the Dynamo forum (here) about whether one could list all the hidden elements in the active view. After some API search, it turns out we can!

Some disclaimers first:

  1. If we want to use the "All elements In Active View"-node as the element input for the node below, we have to enable show hidden elements before we run the definition. (You know, the lightbulb.)
    If you get the elements you're checking from other nodes: no problem.
  2. If the elements are in a hidden category it can't be filtered out. It only applies to hidden elements. Hopefully, someone will prove me wrong and dig up something in the API to facilitate this issue.


Here is the .dyf-file with the Python script:
It's available in the package manager as "Element.IsHidden"

And here's what it does:



(Tip: Do you wanna learn some Python syntax for Dynamo/Revit use? open up one of Andreas Dieckmanns nodes in the Clockwork package and double click the Python scripts!)

Ingen kommentarer:

Legg inn en kommentar