Find and Replace


Hello everyone,

I have created the Dynamo script shown below. Currently, it works on all levels, but I want it to run only on a specific level (Level F3).

I tried to understand where I should define the level input or how I can filter the elements by level, but I couldn’t find the correct approach.

Could you please guide me on how to limit this script so that it works only on Level F3?

Thank you in advance for your help.

Revit 2026.4
Dynamo version: 3.6.1

Instead of “all elements”, why not select only the elements in the view you want to process?

2 Likes

@jacob.small I’m very new to Dynamo, and I made this progress by learning from several sources and with the help of AI. Because of this, I couldn’t fully understand what you suggested. What should I do?

@hakan.sevuk

@jacob.small means you would use something like the ‘All Elements in View(s)’ node from the Data-Shapes package (you would feed in a relevant view such as a floor plan)

Your graph is filtering out Generic Annotations which are view-specific. i.e they are associated with a view, not like model elements which may be associated with a level.

There are many ways to achieve what you want- such as filtering by parameters or other properties.
As you’ve done, you might need to string together several filters

If you do want to filter model elements (associated with a level) the easiest way is probably to use an ‘All Elements at Level’ node (Rhythm package)

1 Like

Thank you for the explanation, that makes sense now.
I didn’t realize that Generic Annotations are view-specific and not level-based.
I will try using All Elements in View(s) with an F3 floor plan instead.
Thanks for clarifying this.

1 Like

@Andrew_Hannell @jacob.small

I managed to get it working and changed all the F8 column numbers on Level F3 to F3. Thank you for your help.
This is the final version of the script. However, it feels like I might be doing more steps than necessary — is that actually the case?

1 Like

Yes.

When i am at the office i’ll give you an example of a cleaner version (unless someone beats me to it).

1 Like

Thank you for taking the time to help. :folded_hands:

1 Like

No need for (1). Your are already grabbing the Generic Annotation for that View with (2).
Generic Annotations are View Specific remember :grin:.

A cleaner version (3)
Note you can use a Code Block for multiple inputs.

In case you want to filter some more (4)

Disclaimer
Didn’t get to test the examples, but those examples should work
IF i wired everything correctly.

2 Likes

It works perfectly, and your explanation was very clear and helpful for me.
Thank you very much for your support. :folded_hands: