PathOfTravelCreate(View, XYZ, XYZ, PathOfTravelCalculationStatus) Method |
Creates a new path of travel between two points and provides creation result status.
Namespace: Autodesk.Revit.DB.AnalysisAssembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntaxpublic static PathOfTravel Create(
View DBView,
XYZ pathStart,
XYZ pathEnd,
out PathOfTravelCalculationStatus resultStatus
)
Public Shared Function Create (
DBView As View,
pathStart As XYZ,
pathEnd As XYZ,
<OutAttribute> ByRef resultStatus As PathOfTravelCalculationStatus
) As PathOfTravel
public:
static PathOfTravel^ Create(
View^ DBView,
XYZ^ pathStart,
XYZ^ pathEnd,
[OutAttribute] PathOfTravelCalculationStatus% resultStatus
)
static member Create :
DBView : View *
pathStart : XYZ *
pathEnd : XYZ *
resultStatus : PathOfTravelCalculationStatus byref -> PathOfTravel
Parameters
- DBView View
-
The floor plan view to use when computing the shortest distance.
- pathStart XYZ
-
The start point of the path. The input Z coordinates are ignored and set to the view's level elevation.
- pathEnd XYZ
-
The end point of the path. The input Z coordinates are ignored and set to the view's level elevation.
- resultStatus PathOfTravelCalculationStatus
-
Result status of path of travel creation.
Return Value
PathOfTravel
The newly created path of travel element, or
if no path between the two points is found.
ExceptionsException | Condition |
---|
ArgumentException |
The element "DBView" is in a family document or a document in in-place edit mode.
-or-
View is not a floor plan view.
|
ArgumentNullException |
A non-optional argument was null
|
ArgumentOutOfRangeException |
A value passed for an enumeration argument is not a member of that enumeration
|
InvalidOperationException |
The document containing DBView is in failure mode: an operation has failed,
and Revit requires the user to either cancel the operation
or fix the problem (usually by deleting certain elements).
-or-
This operation cannot be performed while the document is in edit mode.
-or-
The Path of Travel calculation service is not available
-or-
This functionality is not available in Revit LT.
|
ModificationForbiddenException |
The document containing DBView is in failure mode: an operation has failed,
and Revit requires the user to either cancel the operation
or fix the problem (usually by deleting certain elements).
-or-
The document containing DBView is being loaded, or is in the midst of another
sensitive process.
|
ModificationOutsideTransactionException |
The document containing DBView has no open transaction.
|
Remarks
InvalidOperationException is thrown if PathOfTravel cannot be created for the following conditions:
- View has crop box active and crop box is split
- View has crop box active and start or end point lies outside of the crop
- View model outline area is larger than the current limit (2,000,000 sq.ft.)
- View export contains too much geometry (more than 200,000 lines)
- Start and end points are too close
See Also