All Elements at Level doesn't select new elements

I’m working on a small script, which temporary isolates all elements on a selected level on the active view:

My problem is, All Elements at Level node doesn’t select all elements at the selected level. It seems that “newer” elements are not selected.

If I add new walls to the level, they are also not selected.

The main question is, how All Elements at Level node works? Why new elements are not selected, what should I do to select recently added elements. Closing and opening Dynamo and Revit doesn’t help. What am I missing?

I’m sure the bug is in All Elements at Level node, not in the Temporary Hide node. I checked, there are no bindings in the Dyn file.

Revit 2020.2.1, Dynamo 2.3.0

TemporaryIsolateLevel-DP.dyn (26.8 KB)

Hi @infeeeee,

Try this approach (Genius loki and clockwork)

Let us know if it worked!

1 Like

I don’t think it’s a bug if I’m following your logic here, nodes like this will only recompute if their inputs change. If elements are added to a model after the node is run after the Level node, they wont recompute to see these new elements until the level input changes and tells that node to run again. The nodes are interacting with the Revit db, which didn’t have those new elements last time the nodes interacted with it.

A script like this is best packaged and run via Dynamo Player, which on re-run will always recompute all nodes, assuming element bindings aren’t an issue.

I don’t know how did you found this thread from 2020. As I needed this script for a specific situation that time, I don’t remember the exact details. I don’t have intentions to debug this nowadays. Maybe if I need the script again I will try your solution. But thanks for taking a look!

@GavinCrump I was running this script from Player, that’s why there is DP at the end of the filename, I name my scripts this way, if there is DP at the end it means it should be run from Dynamo Player.

I was working on a historic buildings with a lot of levels, and I wanted to isolate specific levels quickly to see only those parts of the building, as I was modeling from a pointcloud. The problem was if I rerun the script (from player of manually from the editor) the new elements weren’t selected and isolated correctly. So that’s exactly what I did, and it didn’t work.

Yes, Dynamo Player has its own charm!