Duplicates the material
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 26.0.4.0 (26.0.4.0)
Syntaxpublic Material Duplicate(
string name
)
Public Function Duplicate (
name As String
) As Material
public:
Material^ Duplicate(
String^ name
)
member Duplicate :
name : string -> Material
Parameters
- name String
-
Name of the new material - this name must be correctly structured for Revit use and not duplicate the name
of another material in the document.
Return Value
Material
The new material.
ExceptionsException | Condition |
---|
ArgumentException |
name cannot include prohibited characters, such as "{, }, [, ], |, ;, less-than sign, greater-than sign, ?, `, ~".
-or-
The given value for name is already in use as a material element name.
|
ArgumentNullException |
A non-optional argument was null
|
Remarks
If duplication fails for reasons unrelated to the name, will be returned.
See Also