FabricationNetworkChangeService
Description:
This class represents the fabrication part change service and change size tools.
This class represents the fabrication part change service and change size tools.
Remarks:
After a new instance of the class is created, call the ChangeService method to change the service of the fabrication parts or call the ChangeSize method to change the size of the fabrication parts. There is another workflow allowing for more control, call SetSelection to set the selection of fabrication parts to change. To change the service, call SetServiceId and SetGroupId to set the service identifier and group identifier. Changing the service there is an optional methods GetInLinePartTypes and SetMapOfSizesForStraights that can be called to replace in-line valves and dampers to the corresponding parts for the new service. The size can also be changed by calling GetMapOfAllSizesForStraights that will return a FabricationPartSizeMapSet containing a map of sizes for all straights found in the selection of fabrication parts. The FabricationPartSizeMapSet can then be modified to set the mapped values for the new size for the fabrication part straights and then call SetMapOfSizesForStraights set the new sizes that are to be applied. Finally call ApplyChange to apply the previously set parameters to the selection of fabrication parts.
After a new instance of the class is created, call the ChangeService method to change the service of the fabrication parts or call the ChangeSize method to change the size of the fabrication parts. There is another workflow allowing for more control, call SetSelection to set the selection of fabrication parts to change. To change the service, call SetServiceId and SetGroupId to set the service identifier and group identifier. Changing the service there is an optional methods GetInLinePartTypes and SetMapOfSizesForStraights that can be called to replace in-line valves and dampers to the corresponding parts for the new service. The size can also be changed by calling GetMapOfAllSizesForStraights that will return a FabricationPartSizeMapSet containing a map of sizes for all straights found in the selection of fabrication parts. The FabricationPartSizeMapSet can then be modified to set the mapped values for the new size for the fabrication part straights and then call SetMapOfSizesForStraights set the new sizes that are to be applied. Finally call ApplyChange to apply the previously set parameters to the selection of fabrication parts.
- 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.
public class FabricationNetworkChangeService : IDisposable
| Name | Return Type | Description |
|---|---|---|
| FabricationNetworkChangeService(Document) | None | Creates a new instance of the FabricationNetworkChangeService class. |
| Name | Return Type | Description |
|---|---|---|
| ApplyChange() | FabricationNetworkChangeServiceResult | Applies the previously set changes to the selection of fabrication parts to change the size, change the service, or both. |
| ChangeService(ISet<ElementId>, Int32, Int32) | FabricationNetworkChangeServiceResult | Changes the service of the selection of fabrication parts. |
| ChangeService(ISet<ElementId>, Int32, Int32, Boolean) | FabricationNetworkChangeServiceResult | Changes the service of the selection of fabrication parts. |
| ChangeSize(ISet<ElementId>, ISet<FabricationPartSizeMap>) | FabricationNetworkChangeServiceResult | Changes the size of the selection of fabrication parts. |
| Dispose() | None | Releases all resources used by the |
| GetElementsThatFailed() | ISet<ElementId> | Gets the set of fabrication parts that had failures due to either there was no corresponding part in the service, the size was out of range, or a connection could not be made. |
| GetInLinePartTypes() | ISet<ElementId> | Get a set of element identifiers of fabrication part types for in-line parts. |
| GetMapOfAllSizesForStraights() | ISet<FabricationPartSizeMap> | Get a set of FabricationPartSizeMapSet of all straight sizes for all services. |
| GetStraightsThatWereNotChanged() | ISet<ElementId> | Gets the set of fabrication part straights that were not changed due to either there was no corresponding part in the service or the size was out of range. |
| SetGroupId(Int32) | None | Set the fabrication group identifier to change the elements to. |
| SetMapOfInLinePartTypes(IDictionary<ElementId, ElementId>) | None | Set the mapping of fabrication part types for in-line parts for the service and group to change to. |
| SetMapOfSizesForStraights(ISet<FabricationPartSizeMap>) | None | Set the mapping for sizes of fabrication part straights to change the sizes to. |
| SetRestrictGroup(Boolean) | None | Restrict the placement of parts to only use parts associated to the passed in fabrication group identifier. |
| SetSelection(ISet<ElementId>) | FabricationNetworkChangeServiceResult | Set the element selection to change the service or size for. |
| SetServiceId(Int32) | None | Set the fabrication service identifier to change the elements to. |
| Name | Return Type | Description |
|---|---|---|
| IsValidObject | bool | Specifies whether the .NET object represents a valid Revit entity. |