Compare Method


Model Path Compare Method

Compares this ModelPath with another

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public int Compare(
	ModelPath otherPath
)

Parameters

otherPath ModelPath
The path to compare against.

Return Value

Int32
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
Exceptions
Exception Condition
ArgumentNullException A non-optional argument was null
Remarks
The comparison is case-insensitive.
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 →