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?
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:
import clr
import sys
import System
from System.Collections.Generic import List
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
import Autodesk.DesignScript.Geometry as DS
clr.AddReference('RevitAPI')
import Autodesk
from Autodesk.Revit.DB import *
import Autodesk.Revit.DB as DB
clr.AddReference('RevitServices')
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