New to Dynamo - Delete Annotation Symbols from Families


Since I’m new to dynamo, I don’t know how to run a simple task like Delete Symbols or Annotation. I would like to Delete multiple Annotations from the Families tree so that there isn’t trace of it in the model. Like purging those symbols. I would like to run this script every time I get an updated model from the ARCH. Any ideas?

Thank you

Hi @jkhounemany ,

If I understand you correctly you would like to delete specific Annotation Symbols, which are accesible from the Revit Families tree, as seen below:

If so, here is a way to access these Families inside Dynamo. I don’t know which exact annotations you want to have removed so I left the removal part out of it for now:

2022-06-23 Filter Revit objects within Revit category.dyn (13.2 KB)

Python Code by @c.poupin :
import clr
import sys
import System
from System.Collections.Generic import List
from Autodesk.DesignScript.Geometry import *
import Autodesk.DesignScript.Geometry as DS

import Autodesk
from Autodesk.Revit.DB import *
import Autodesk.Revit.DB as DB

import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

doc = DocumentManager.Instance.CurrentDBDocument

filterAnnot = System.Predicate[System.Object](lambda x : x.Family.FamilyCategory.CategoryType == CategoryType.Annotation)
symbAnnot = List[Element](FilteredElementCollector(doc).OfClass(FamilySymbol).ToElements()).FindAll(filterAnnot)

OUT = symbAnnot