Compare Method


Compares this ModelPath with another

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since:  2012

Syntax

C#
public int Compare(
	ModelPath otherPath
)
Visual Basic
Public Function Compare ( _
	otherPath As ModelPath _
) As Integer
Visual C++
public:
int Compare(
	ModelPath^ otherPath
)

Parameters

otherPath
Type: Autodesk.Revit.DBModelPath
The path to compare against.

Return Value

A signed integer indicating the lexical relationship between two ModelPaths. Value is less than zero if this path is less than the given path; zero if the two are the same; and more than zero otherwise

Remarks

The comparison is case-insensitive.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was null

See Also

ArchiLabs Desktop

Put AI to work inside Revit.

Give Desktop your instructions and project files to build Revit families, update model elements, and create views and schedules. Works directly in Revit and AutoCAD.

Explore Desktop →