Revit 2025 API
MEPSystemRemove(ICollectionElement |
Remove elements from system.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public virtual void Remove( ICollection<ElementId> elementIds )
Public Overridable Sub Remove ( elementIds As ICollection(Of ElementId) )
public: virtual void Remove( ICollection<ElementId^>^ elementIds )
abstract Remove : elementIds : ICollection<ElementId> -> unit override Remove : elementIds : ICollection<ElementId> -> unit
Parameters
- elementIds ICollectionElementId
- The elements to be removed from the system.

Exception | Condition |
---|---|
ArgumentNullException | Thrown when the input argument elements is , or any element in that collection is . |
ArgumentException | Thrown when some of the elements can't be removed, or when trying to remove all elements from the system. The element which connect to the base equipment can't be removed, |
InvalidOperationException | Thrown when the operation failed. |

It is forbidden to remove all terminal elements from system.
Terminal elements will be removed from the system automatically after removing this system from document.
See Also