MEP Fabrication Detailing

Several Revit API classes work together to provide the ability to add fabrication components to a Revit MEP document.

Fabrication detailing classes

Before you can place fabrication parts in a Revit MEP model, you must specify a fabrication configuration and load fabrication services into the model. There are a number of classes in the Revit API to facilitate this process including:

The primary classes involved in MEP Fabrication are covered in more detail below. Sample code can be found in the Revit SDK in the FabricationPartLayout sample.

Fabrication configuration

Using the FabricationConfiguration class, users can get and set the fabrication configuration settings for the document. They can also load and unload services, reload the fabrication configuration, get loaded services, get fabrication specifications, get material and insulation information from the configuration, and get connector information.

There is only one fabrication configuration for the document and you can get it using the static FabricationConfiguration.GetFabricationConfiguration() method. To change the configuration, call the SetConfiguration() method, passing in a FabricationConfigurationInfo object which contains the information about the FabricationConfiguration.

The ReloadConfiguration() method reloads the fabrication configuration from its source fabrication configuration. This must be done prior to loading fabrication services.

Use the GetAllLoadedServices() method to get all loaded services or GetAllUsedServices() to get only used fabrication services. A service is in use if any fabrication part in the service is created by the user. Both methods return a list of FabricationService objects.

LoadServices() and UnloadServices() can be used to load and unload a list of fabrication services, respectively.

Fabrication services

Fabrication services are part of the fabrication configuration and define what fabrication service buttons can be used. The GroupCount property returns the number of groups in the service. Using the index of the groups, you can call GetGroupName() to get the name of the group. The method GetButtonCount() will return the number of buttons in a specified group and the actual buttons can be retrieved by calling GetButton() with a specified group index and button index.

Fabrication service button

The FabricationServiceButton class contains information about a fabrication button. A fabrication service button defines what items to use for different conditions. Fabrication service buttons are part of a fabrication service.

The FabricationServiceButton class contains information about a fabrication button. A fabrication service button defines an item that can be used to define a FabricationPart, possibly subject to a list of specific conditions. Fabrication service buttons are part of a fabrication service.

Fabrication parts

Using the FabricationPart class, users can create, place, move and align fabrication parts in a Revit model. Users can also get or set the dimensions of the fabrication part, and get the fabrication hosted information and rod information.

The overloaded static FabricationPart.Create() method creates a new fabrication part based on a fabrication service button. The overloaded static CreateHanger() method creates a hanger on another fabrication part. The static AlignPartByConnectors() method will move and align a fabrication part by one of its connectors to align with another connector.

Methods also exist to get and set the value of the fabrication dimension, to get the host element information and to get the fabrication rod information.