Skip to content

Element Listing

Find elements by type or classification, read the current selection, and identify element types.

Access this group through api.official.element_listing.

Commands

For exceptions shared by Unified API commands, see error handling.

get_all_elements

get_all_elements() -> list[ElementIdArrayItem]

Returns the identifier of every element in the current plan.

Returns:

get_elements_by_classification

get_elements_by_classification(
    classification_item_id: ClassificationItemId,
) -> list[ElementIdArrayItem]

Returns the identifier of every element with the given classification identifier.

Parameters:

Returns:

get_elements_by_type

get_elements_by_type(
    element_type: ElementType,
) -> list[ElementIdArrayItem]

Returns the identifier of every element of the given type on the plan.

Parameters:

Returns:

get_selected_elements

get_selected_elements(
    only_editable: None | bool = None,
    only_supported_types: None | bool = None,
) -> list[ElementIdArrayItem]

Returns the identifiers of selected elements in the current plan.

Parameters:

  • only_editable (None | bool, default: None ) –

    Optional parameter that defines whether the selection list should include only the editable elements or all of them. The default value is FALSE

  • only_supported_types (None | bool, default: None ) –

    Optional parameter. When it is set to true, only elements with types that are supported by any other JSON API command will be returned.

Returns:

get_types_of_elements

get_types_of_elements(
    elements: list[ElementIdArrayItem],
) -> list[ErrorItem | TypeOfElementWrapperItem]

Returns the types of the given elements.

Parameters:

Returns:

These include the parameter and result models used inside the client. The command signatures above show what to pass and what is returned.