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:
- 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
- This relied on having the Family parameter list sorted Ascending in the Family Editor
- The Excel sheet looked a bit like this – notice how the driving parameter is an Integer?
- This is the work in progress in Dynamo – getting the Generic Annotation families, matching them up and getting the related Excel integer value
- 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?
- And here is one instance in the project
- After running this once, all visibility states are set properly throughout the project
Yet another example of @dynamobim making the Revit-impossible, possible 🙂
Why?!
Haha, if you must know I had converted around 60 sheets of PDF markups from Bluebeam into a single Generic Annotation, and I was putting these on the sheets as an overlay. I know it isn't ideal but it was all I had to work with 🙂
However, as someone mentioned on Twitter, this could be used to automatically drive a Key Legend annotation family too, provided you can establish some commonality to map between a Sheet or View parameter and the Annotation family.