Keynote types
Determine types of user keynotes - essential in model checking as 'User keynotes' should be zero to a few on any given project. Uses FEC (Filtered element collector) to gather all keynote tags and looks at the instance parameter to determine the type. GPT Tweak to export as list counts: # Load the required libraries import clr clr . AddReference ( "RevitServices" ) import RevitServices from RevitServices . Persistence import DocumentManager from RevitServices . Transactions import TransactionManager clr . AddReference ( "RevitAPI" ) from Autodesk . Revit . DB import * # Access the current Revit document doc = DocumentManager . Instance . CurrentDBDocument # Define the categories for User, Element, and Material keynotes keynoteCategories = { "User" : "User" , "Element" : "Element" , "Material" : "Material" } # Initialize counters for each category