Get Default Element Type

Native Family

# Get Default Types
wall_type_id   = doc.GetDefaultElementTypeId(ElementTypeGroup.WallType)
floor_type_id  = doc.GetDefaultElementTypeId(ElementTypeGroup.FloorType)
roof_type_id   = doc.GetDefaultElementTypeId(ElementTypeGroup.RoofType)
region_type_id = doc.GetDefaultElementTypeId(ElementTypeGroup.FilledRegionType)
pipe_type_id   = doc.GetDefaultElementTypeId(ElementTypeGroup.PipeType)

# Convert ElementId to Element
wall_type = doc.GetElement(wall_type_id)

Loaded Family

# Get Default Types
window_type_id   = doc.GetDefaultFamilyTypeId(ElementId(BuiltInCategory.OST_Windows))
door_type_id     = doc.GetDefaultFamilyTypeId(ElementId(BuiltInCategory.OST_Doors))
gen__type_id     = doc.GetDefaultFamilyTypeId(ElementId(BuiltInCategory.OST_GenericModel))
wall_tag_type_id = doc.GetDefaultFamilyTypeId(ElementId(BuiltInCategory.OST_WallTags))

# Convert ElementId to Element
window_type = doc.GetElement(window_type_id)



⌨️ Happy Coding!
Erik Frits