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: 24.0.0.0 (24.0.0.0)
Since:  2022 
Syntax
| C# | 
|---|
|  | 
| Visual Basic | 
|---|
|  | 
| Visual C++ | 
|---|
|  | 
Parameters
- document
- Type: Autodesk.Revit.DBDocument
 Document to check
- name
- Type: SystemString
 Name to check.
Return Value
Whether or not the name is valid.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. 
Exceptions
| Exception | Condition | 
|---|---|
| Autodesk.Revit.ExceptionsArgumentNullException | A non-optional argument was null |