For a floor plan view, calculates the paths from each start point to its closest destination and return the path end points.
Namespace: Autodesk.Revit.DB.AnalysisAssembly: RevitAPI (in RevitAPI.dll) Version: 21.0.0.0 (21.1.1.109)
Since: 2020.2
Syntax
C# |
---|
public static IList<XYZ> FindEndsOfShortestPaths( View DBView, IList<XYZ> destinationPoints, IList<XYZ> startPoints ) |
Visual Basic |
---|
Public Shared Function FindEndsOfShortestPaths ( _ DBView As View, _ destinationPoints As IList(Of XYZ), _ startPoints As IList(Of XYZ) _ ) As IList(Of XYZ) |
Visual C++ |
---|
public: static IList<XYZ^>^ FindEndsOfShortestPaths( View^ DBView, IList<XYZ^>^ destinationPoints, IList<XYZ^>^ startPoints ) |
Parameters
- DBView
- Type: Autodesk.Revit.DB..::..View
The floor plan view to use when computing the points.
- destinationPoints
- Type: System.Collections.Generic..::..IList<(Of <(<'XYZ>)>)>
Destination points. The input Z coordinates are ignored and set to the view's level elevation.
- startPoints
- Type: System.Collections.Generic..::..IList<(Of <(<'XYZ>)>)>
Start points for which shortest path end points are calculated.
Return Value
End points of paths calculated from each start point to its corresponding closest destination. If a path cannot be calculated the corresponsing end point is set to nullNothingnullptra null reference (Nothing in Visual Basic).
Remarks
The calculation is done in a floor plan with one or more destinationPoints and one or more startPoints.
The shortest path is calculated from each start point to its corresponding closest destination.
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.Exceptions..::..ArgumentException | View is not a floor plan view. |
Autodesk.Revit.Exceptions..::..ArgumentNullException | A non-optional argument was NULL |
Autodesk.Revit.Exceptions..::..InvalidOperationException | The Path of Travel calculation service is not available -or- This functionality is not available in Revit LT. |