Share

Material.Duplicate Method

Duplicates the material


Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 26.2.0.0 (26.2.0.0)

Syntax

C#

public Material Duplicate(
	string name
)

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.

Exceptions

ExceptionCondition
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, null will be returned.

See Also

Reference

Was this information helpful?