Dynamo to turn on/off attached detail groups by view

We use a bunch of model groups to put together our model for our floor plans and we have attached detail groups for all the annotations with the same name scheme: FP - Anno, EL - Anno, ELEV - Anno. is there a way in dynamo to turn on a specific detail group for a particular view? so on my floor plan sheets I can turn on FP - Anno and on my electrical sheets I can turn on EL - Anno? any help would be much appreciated.

Revit API opened this up last year, at the time I played around with it a little. It is certainly possible. Unsure if one of the bigger packages included a few nodes with these functions.

Will check to see if I can find my examples when I get back behind my laptop.

I left it last year on finding the Attached Detail Groups and turning them on. There is also functions for hiding them (probably should do that first in the script so you have a clean start point.)

Small test file to go with the example:

AttachedDetailGroups_1_3_3.dyn (52.4 KB)

AttachedDetailGroups Group.GetAttachedDetailGroups.dyf (2.9 KB) Group.ShowAttachedDetailGroup.dyf (4.2 KB)

1 Like

This is awesome, thank you so much. This gives me something to play with.

@Bjorn_Keulemans1

I guess i am missing something, but how do you turn them off again?

https://www.revitapidocs.com/2020/2a695dff-8aa5-c266-1d4e-870483e9b5dc.htm

https://www.revitapidocs.com/2020/660bd48f-dd60-562c-1935-8fcbd258669a.htm

There’s HideAllAttachedDetailGroups and HideAttachedDetailGroups.

I also see in R20 that there are a few more options for Attached Detail Groups, like checking if the view is compatible with the chosen Detail Group and finding the Model Group Id from the Detail Group.