Revit 2025 API
Fabrication |
Changes the service of the selection of fabrication parts.
Namespace: Autodesk.Revit.DB.Fabrication
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public FabricationNetworkChangeServiceResult ChangeService( ISet<ElementId> selection, int serviceId, int paletteId, bool restrictPalette )
Public Function ChangeService ( selection As ISet(Of ElementId), serviceId As Integer, paletteId As Integer, restrictPalette As Boolean ) As FabricationNetworkChangeServiceResult
public: FabricationNetworkChangeServiceResult ChangeService( ISet<ElementId^>^ selection, int serviceId, int paletteId, bool restrictPalette )
member ChangeService : selection : ISet<ElementId> * serviceId : int * paletteId : int * restrictPalette : bool -> FabricationNetworkChangeServiceResult
Parameters
- selection ISetElementId
- The set of element identifiers of fabrication parts to change the service for.
- serviceId Int32
- The identifier of the fabrication service.
- paletteId Int32
- The identifier of the fabrication palette.
- restrictPalette Boolean
- Restrict the placement of parts to the passed in palette identifier.
Return Value
FabricationNetworkChangeServiceResult
Exception | Condition |
---|---|
ArgumentException | The selection contains invalid elements to change. |
ArgumentNullException | A non-optional argument was null |
InvalidOperationException | No fabrication configuration is loaded. |

After this method has been invoked, call:
- GetStraightsThatWereNotChanged to get a set of fabrication part straight element identifiers that were not changed.
- GetElementsThatFailed to get a set of fabrication part element identifiers that had failures.
See Also