Let’s say you have a Generic Annotation family with about 60 different view states controlled by visibility Yes/No checkboxes. These visibility states are linked to Sheets, and the Generic Annotation families themselves are placed in the Sheet views in Revit. I’m sure you are thinking “why??” at this point, but let’s skip past that part…

Can we drive the Annotation family visibility states based on its ‘host Sheet’ in Revit? Not really.

Can we create a mapping table in Excel, Dynamo-push a single integer value into the Annotation instances based on the host Sheet, and drive the visibility by formula that way? Yep.

Here’s the basic steps:

  1. I used dir and Notepad++ to make the list, one column in Excel for the lookup value (I used Sheet Number), and one for the parameter I want to get and use
  2. This relied on having the Family parameter list sorted Ascending in the Family Editor

  3. The Excel sheet looked a bit like this – notice how the driving parameter is an Integer?

  4. This is the work in progress in Dynamo – getting the Generic Annotation families, matching them up and getting the related Excel integer value

  5. This is the completed dyn, with the push back into the Element Parameter to drive the visibility – see how the string has to get converted ToNumber before pushing into the Integer parameter?

  6. And here is one instance in the project

  7. After running this once, all visibility states are set properly throughout the project

Yet another example of @dynamobim making the Revit-impossible, possible 🙂