IsValidName Method


IFCCategory Template Is Valid Name Method

Returns result that the proposed name is valid and not exist in the specified document.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public static bool IsValidName(
	Document document,
	string name
)

Parameters

document Document
Document to check
name String
Name to check.

Return Value

Boolean
Whether or not the name is valid.
Exceptions
Exception Condition
ArgumentNullException A non-optional argument was null
Remarks
Name can't contains following characters, such as { } [ ] | ; < > ? ` ~ \ : \r \n \f \t \v. Name can't be blank. If true, the name is valid and not exist in specified document. If false, the name is not a valid name which means it does not exist in specified document.
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 →