Get all Annotations elements in project


A co-worker asked me if I could write a scipt that look throught all the view in a project and find places where any annotation tags might overlap and reduce readability. So I set out to find all annotations elements, get their host views, filter it all by view, create some geometry on their insertion points and clash them. Maybe drawing big red circle on the views or something. The latter part, I get, the first, I don’t.

My problem is that i’am unable to collect all the annotations in any way.

  • The Category > All element of category doesnt work for half of them ( namely, door and wall tags ) even if it seem to work for this guy: Select annotations by associated revit id of modelled element
  • Collect All Tags in Project in Bakery, doesnt do anything for me.
  • Collector.TagTypes only has four outputs, two of them don’t work.
  • List the views workset of all tags in prject, return nothing
  • Multiple python scripts using Revit.DB.Category and tries to fetch elements from them with FilteredElementCollector don’t do much eighter.

What am I doing wrong?

There is about 98 OST_"Categories"Tags in revit, I know it’s overkill, but I want all their elements.

I link my fumblings of a graph as reference

I’m on Revit 2017.1, running dynamo

I this point I am more worried about whether I can, than whether I should write that script.

Clash_of_Annotations_by_Location.dyn (61.6 KB)

Can you copy all of the contents from the custom node to your graph and see if you’re getting any errors?

I tried creating a node for this, it’s not perfect, but it might suit your needs. It will at least include every Tag category, maybe you could do some filtering by string to only get the Tag categories.


It’s in the MEPover package.


Thank you both for your answers,

I did, they mostly failed when it came to actually getting the elements from the revit file in their python scripts at the: << (FilteredElementCollector(doc).WhereElementIsNotElementType().OfCategory(builtInName[0]).ToElements()) >> part.

Your node makes things easier but i’m not quite there yet. Great package btw, can’t wait to go thought it.

My problem remains my inability to collect some important elements from their categories ( Door tags, Wall tags, etc ) See gray group in graph.

Linked is my graph as it stand now. Dependencies: ClockWork, MEPover

Clash_of_Annotations_by_Location.dyn (43.9 KB)

EDIT: I upgraded to this morning, before writing this post

see Selecting Tags elements
see Selecting Tags Associated to a Linked Model

Seems a bug is doing it