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

GetDefaultElementTypeId

Method
Description:
Gets the default element type id with the given DefaultElementType id.
Syntax
public ElementId GetDefaultElementTypeId(
	ElementTypeGroup defaultTypeId
)
Examples
private bool IsWallUsingDefaultType(Document document, Wall wall)
{
    ElementId defaultElementTypeId = document.GetDefaultElementTypeId(ElementTypeGroup.WallType);
    return (wall.WallType.Id == defaultElementTypeId);
}
Parameters
Parameter Type Description
defaultTypeId Autodesk.Revit.DB.ElementTypeGroup The default element type id.
Return Value
Type Description
Autodesk.Revit.Exceptions.ArgumentOutOfRangeException The element type id.
Exceptions
Exception Condition
Autodesk.Revit.Exceptions.ArgumentOutOfRangeException A value passed for an enumeration argument is not a member of that enumeration