RVTDocs.com
Namespace: Autodesk.Revit.DB Class: Material

Material.IsMaterialOrValidDefault

Method
Description:
Validates whether the specified element id is a material element.
Syntax
public static bool IsMaterialOrValidDefault(
	Element pElem,
	ElementId materialId
)
Parameters
Parameter Type Description
pElem Element An element which will be applied the material
materialId ElementId The element id to be checked.
Return Value
Type Description
Boolean True if the element a material element or invalidElementId, which means take material from category, false otherwise.
Exceptions
Exception Condition
ArgumentNullException A non-optional argument was null