Node to select all elements (EVEN THE ONES NOT VISIBLE IN ACTIVE VIEW)

What node do I use to select all elements? since “all elements in active view” selects only visibles elements. Elements like stairs aren’t selected and i need them to be selected aswell.

What exactly are you trying to do? “Select all elements” is somewhat vague. What kind of elements? All elements is probably not what you’re actually after. All placed elements? All model elements? All elements of specific categories?

I want to calculate the volume of each material (concrete, steel, etc) in the building.

So you’d first want to determine what kinds of elements (likely by category) you’ll have. You can then use Dynamo’s All Elements of Category or a FilteredElementCollector via the API to select elements by category (or class, custom filter, etc. with the FEC).

The bigger problem is that it’s unlikely your model is setup to pull correct material volumes. Does each element have a material and volume already assigned or are you trying to calculate the volume as well? Are you considering multiple materials for a single element or will each element only represent one material? How much of that element is being calculated for the material volume? If you just want a rough rough estimate you can go about it this way, but this usually isn’t helpful for accurate takeoffs.

So, I want it to be able to run on any model, so I don’t know what kind of elements will be involved.

I use the element.material+ node for pulling material volumes, the node uses the material name and volume from revit and give you total volume of material. It not 100% accurate but it’s the best I found.

I have attached my file for extra reference

summaterials.dyn (68.3 KB)

You still have to determine what kinds of elements could exist. There is no method for getting all arbitrary elements modeled so you have to determine what kind of logic will work best for you. If you don’t even want a chance of missing some then you could use a custom node or API method to get all model element categories and then all elements of those categories.

1 Like

I’ve previously achieved this by using a filtered element collector with the only filter being that it’s visible in a newly created 3D view, and where the element is not an element type.

Typically you should at the very least limit what you require using categories. I have a workflow on this video for formwork estimation where I collect and filter structural elements quite broadly, it might help:

1 Like