Exploding a model group in Revit breaks it down into its individual components. This can be done directly within the Revit user interface or programmatically using the API for more complex or bulk operations.
In Revit, there are two primary commands related to breaking down groups: Explode and Ungroup. While often used interchangeably in general discussion, they function differently.
Using the Revit User Interface
The most common way to explode a model group is directly through the Revit UI.
-
Select the Group: Click on the model group you want to explode in your view.
-
Access Modify Tab: Once selected, the "Modify | Model Groups" contextual tab will appear in the ribbon.
-
Choose the Command: In the "Group" panel on this tab, you will find the "Explode" and "Ungroup" buttons.
- Ungroup: This command breaks the selected group into its elements. If any of the elements within the group were also groups, they remain intact as groups. This is useful for removing the outer layer of grouping while preserving nested groups.
- Explode: This command breaks the selected group down into its individual elements. If the group contains nested groups, Explode will also break those nested groups down into their basic elements recursively. This is a more complete breakdown.
Practical Considerations
- Exploding a group removes the group definition itself from that instance in the model.
- Be mindful when exploding groups, especially those that are copied or arrayed, as this action cannot be undone easily for multiple instances simultaneously.
- Elements from an exploded group become individual editable elements in the model.
Difference Between Ungroup and Explode
Understanding the distinction is key to choosing the right action:
Feature | Ungroup | Explode |
---|---|---|
Nested Groups | Remain intact as groups | Are also broken down into elements |
Result | Elements + potentially nested groups | All elements become individual entities |
Depth | Breaks only the top-level group instance | Breaks down recursively through nested groups |
Exploding Groups Programmatically (API)
For advanced users or when needing to automate the process, such as exploding all instances of a specific group type or handling complex scenarios like arrayed groups mentioned in the reference, the Revit API is used.
As highlighted in the reference (Revit Snippet: Instantly Explode All Array Groups), when you modify the Revit model programmatically, such as exploding groups via the API, you must use a Transaction. Modifications to the model database are not possible outside of an active transaction. This ensures data integrity and allows changes to be committed or rolled back.
Using the API involves writing scripts or plugins, typically in C# or VB.NET, to select group instances and apply the Explode()
method on the group element within a transaction. This approach is powerful for bulk operations or custom logic but requires programming knowledge.
Why Use API for Exploding?
- Bulk Operations: Explode many groups at once (e.g., all array groups, all groups on a specific level).
- Conditional Logic: Explode groups based on specific criteria (e.g., groups containing certain elements, groups with a specific name).
- Automation: Integrate group exploding into larger automation workflows.
In summary, while the UI provides a straightforward way to explode or ungroup individual model groups, the API, requiring transactions for model modification, offers powerful capabilities for automating and customizing the process, particularly for bulk actions like exploding array groups.