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: 22.0.0.0 (22.1.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.DB..::..Document
Document in which name uniqueness is verified.
name
Type: System..::..String
Name to verify uniqueness of.
excludedElement
Type: Autodesk.Revit.DB.Analysis..::..AnalysisDisplayStyle
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.Exceptions..::..ArgumentNullException A non-optional argument was null

See Also