ElementTypeDuplicate Method |
Duplicates an existing element type and assigns it a new name.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntaxpublic ElementType Duplicate(
string name
)
Public Function Duplicate (
name As String
) As ElementType
public:
ElementType^ Duplicate(
String^ name
)
member Duplicate :
name : string -> ElementType
Parameters
- name String
-
The new name of the element type.
Return Value
ElementType
The duplicated element type.
ExceptionsException | Condition |
---|
ArgumentException |
name is an empty string.
-or-
name cannot include prohibited characters, such as "{, }, [, ], |, ;, less-than sign, greater-than sign, ?, `, ~".
-or-
The element type name was empty, contained invalid characters, or was invalid for the specific element type.
-or-
The name is already in use for this element type.
|
ArgumentNullException |
A non-optional argument was null
|
InternalException |
Duplicate element type could not be obtained.
|
InvalidOperationException |
The ElementType cannot be copied.
|
See Also