FindStartsOfLongestPathsFromRooms Method


For a floor plan view, calculates paths from points inside rooms to the closests of the destinations. Returns the start points of the longest path(s). If multiple paths have the same longest length, returns multiple start points.

Namespace: Autodesk.Revit.DB.Analysis
Assembly: RevitAPI (in RevitAPI.dll) Version: 22.0.0.0 (22.1.0.0)
Since: 2020.2

Syntax

C#
public static IList<XYZ> FindStartsOfLongestPathsFromRooms(
	View DBView,
	IList<XYZ> destinationPoints
)
Visual Basic
Public Shared Function FindStartsOfLongestPathsFromRooms ( _
	DBView As View, _
	destinationPoints As IList(Of XYZ) _
) As IList(Of XYZ)
Visual C++
public:
static IList<XYZ^>^ FindStartsOfLongestPathsFromRooms(
	View^ DBView, 
	IList<XYZ^>^ destinationPoints
)

Parameters

DBView
Type: Autodesk.Revit.DB View
The floor plan view to use when computing the points.
destinationPoints
Type: System.Collections.Generic IList XYZ
Destination points. The input Z coordinates are ignored and set to the view's level elevation.

Return Value

Start points of the paths with longest lengths. The array is empty if there are no valid paths from any points in rooms to any of the destination points.

Remarks

The entire plan is divided in small tiles, and the distance to the closest destination point is calculated for each tile center point. Only tile center points that are located in rooms in the view are taken into account.

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.

See Also