Namespace:
Autodesk.Revit.DB.Analysis
MEPNetworkIterator
Class
Description:
An iterator to traverse the MEP analytical network.
An iterator to traverse the MEP analytical network.
Remarks:
The iterator will visit the entire MEP analytical network in the depth-first order. For evert next step, one analytical node and one analytical segment are typically visited. Sometimes an extra node is provided if the iteration reaches the end on one side and restarts at the previous intersect node. Also note that the start step may not contain any segment.
The iterator will visit the entire MEP analytical network in the depth-first order. For evert next step, one analytical node and one analytical segment are typically visited. Sometimes an extra node is provided if the iteration reaches the end on one side and restarts at the previous intersect node. Also note that the start step may not contain any segment.
Inheritance Hierarchy:
System.Object
Autodesk.Revit.DB.Analysis.MEPNetworkIterator
System.Object
Autodesk.Revit.DB.Analysis.MEPNetworkIterator
Syntax
public class MEPNetworkIterator : IDisposable
Examples
// Create a new MEPNetworkIterator to traverse a piping network in the depth-first order.
int segmentCount = 0;
MEPNetworkIterator netIter = new MEPNetworkIterator(doc, modelData, ConnectorDomainType.Piping);
for(netIter.Start(); !netIter.End(); netIter.Next())
{
MEPAnalyticalSegment segment = netIter.GetAnalyticalSegment();
if (segment != null)
segmentCount++;
}