IsNameUnique Method


Verify the uniqueness of the name among all analysis display style elements of the document.

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

Syntax

C#
public static bool IsNameUnique(
	Document document,
	string name,
	AnalysisDisplayStyle excludedElement
)
Visual Basic
Public Shared Function IsNameUnique ( _
	document As Document, _
	name As String, _
	excludedElement As AnalysisDisplayStyle _
) As Boolean
Visual C++
public:
static bool IsNameUnique(
	Document^ document, 
	String^ name, 
	AnalysisDisplayStyle^ excludedElement
)

Parameters

document
Type: Autodesk.Revit.DBDocument
Document in which name uniqueness is verified.
name
Type: SystemString
Name to verify uniqueness of.
excludedElement
Type: Autodesk.Revit.DB.AnalysisAnalysisDisplayStyle
Element to be excluded from uniqueness verification (for renaming of an existing element).

Return Value

True if name is unique, false otherwise.

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 →