Application: AttachedDetailGroup
Revit Platform: All
Revit Version: 2019.1
First Released For: 2019.1
Programming Language: C#
Skill Level: Medium
Category: Elements
Type: ExternalApplication

Subject: Attached Detail Group
Summary: 
This sample shows how to show and hide the attached detail groups of a model group.

Classes:
Autodesk.Revit.UI.IExternalApplication
Autodesk.Revit.UI.IExternalCommand
Autodesk.Revit.DB.Group

Project Files: 
Application.cs
It contains the class Application which inherits from the interface IExternalApplication and creates the UI ribbon components when Revit starts.
AttachedDetailGroupShowAllCommand.cs
It contains the class AttachedDetailGroupShowAllCommand which inherits from interface IExternalCommand and implements the Execute method.
AttachedDetailGroupHideAllCommand.cs
It contains the class AttachedDetailGroupHideAllCommand which inherits from interface IExternalCommand and implements the Execute method.

Description: 
This sample provides following functionality.
-	Let the user show or hide a model group’s attached detail groups in the active view.

Instructions: 
Open Revit application.
1.	Create two parallel walls with an aligned dimension between them.
2.	Select the two walls and the dimension and create a group.
a.	Expected result: a model group containing the two walls and an attached detail group containing the dimension are created.
3.	Select the model group.
4.	Select the Addins ribbon menu.
5.	Execute the Hide All Detail Groups command in the Attached Detail Group ribbon panel.
a.	Expected result: The attached detail group is no longer visible.
6.	Execute the Show All Detail Groups command in the Attached Detail Group ribbon panel.
a.	Expected result: The attached detail group is now visible.