Revit 2025 API
Numbering |
Tests if the given string can be used as a name for a numbering partition.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public static bool IsValidPartitionName( string name, out string message )
Public Shared Function IsValidPartitionName ( name As String, <OutAttribute> ByRef message As String ) As Boolean
public: static bool IsValidPartitionName( String^ name, [OutAttribute] String^% message )
static member IsValidPartitionName : name : string * message : string byref -> bool
Parameters
- name String
- A name to validate.
- message String
- Optional string to receive an error message to possibly show to the end user in case the name is found invalid. This argument may be null.
Return Value
BooleanReturns True if the name can be used; or False if the string contains invalid characters.

Exception | Condition |
---|---|
ArgumentNullException | A non-optional argument was null |

For a name to be considered valid it must contain only printable characters
excluding any characters that may not be used in name of a file.
See Also