| Revit 2020 API |
| FabricationNetworkChangeService..::..ChangeService Method (ISet<(Of <(<'ElementId>)>)>, Int32, Int32, Boolean) |
| FabricationNetworkChangeService Class See Also |
Changes the service of the selection of fabrication parts.
Namespace: Autodesk.Revit.DB.Fabrication
Assembly: RevitAPI (in RevitAPI.dll) Version: 20.0.0.0 (20.0.0.377)
Since:
2020
Syntax
| C# |
|---|
public FabricationNetworkChangeServiceResult ChangeService( ISet<ElementId> selection, int serviceId, int groupId, bool restrictGroup ) |
| Visual Basic |
|---|
Public Function ChangeService ( _ selection As ISet(Of ElementId), _ serviceId As Integer, _ groupId As Integer, _ restrictGroup As Boolean _ ) As FabricationNetworkChangeServiceResult |
| Visual C++ |
|---|
public: FabricationNetworkChangeServiceResult ChangeService( ISet<ElementId^>^ selection, int serviceId, int groupId, bool restrictGroup ) |
Parameters
- selection
- Type: System.Collections.Generic..::..ISet<(Of <(<'ElementId>)>)>
The set of element identifiers of fabrication parts to change the service for.
- serviceId
- Type: System..::..Int32
The identifier of the fabrication service.
- groupId
- Type: System..::..Int32
The identifier of the fabrication group.
- restrictGroup
- Type: System..::..Boolean
Restrict the placement of parts to the passed in group identifier.
Remarks
After this method has been invoked, call:
- GetStraightsThatWereNotChanged()()()() to get a set of fabrication part straight element identifiers that were not changed.
- [!:GetElementsThatHadFailures] to get a set of fabrication part element identifiers that had failures.
Exceptions
| Exception | Condition |
|---|---|
| Autodesk.Revit.Exceptions..::..ArgumentException | The selection contains invalid elements to change. |
| Autodesk.Revit.Exceptions..::..ArgumentNullException | A non-optional argument was NULL |
| Autodesk.Revit.Exceptions..::..InvalidOperationException | No fabrication configuration is loaded. |