Skip to content

MEP Commands (extended)

Read and edit MEP preference tables and their rows.

Access this group through api.tapir.mep_extended.

Commands

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

add_mep_preference_table_rows

add_mep_preference_table_rows(
    table_id: MEPPreferenceTableId,
    rows: list[MEPPreferenceRowAddition],
) -> list[
    FailedExecutionResult | MEPPreferenceRowAdditionResult
]

Adds rows with the given keys and optionally values to a branch, elbow or transition preference table and returns their index, in one undo step. Branch tables from Archicad 28, elbow and transition tables from Archicad 29; segment tables have a row for each reference id. On Archicad 27 a row is added to the list of the given shape of any preference table, and the index of each new row after the call is returned. Available from Archicad 27.

Parameters:

  • table_id (MEPPreferenceTableId) –

    The guid of a preference table, as returned by GetMEPPreferenceTables (the branch, elbow and transition tables with includeFittingTables): a pipe or circular duct segment table, a branch or elbow table of the Piping or Ventilation domain, or, from Archicad 29, a transition table. Rectangular duct and cable carrier segment tables are found too, but their rows have no key. Archicad 27: any preference table, as returned by GetMEPPreferenceTableContainers.

  • rows (list[MEPPreferenceRowAddition]) –

    The rows to add, with their key and optionally their values. Branch tables from Archicad 28, elbow and transition tables from Archicad 29. Segment tables have a row for each reference id, so no row can be added to them. Archicad 27: the key has the shape only, the table gives the index.

Returns:

create_mep_preference_tables

create_mep_preference_tables(
    domain: MEPPreferenceTableDomain,
    tables: list[MEPPreferenceTableData],
) -> list[
    FailedExecutionResult | MEPPreferenceTableCreationResult
]

Adds empty preference tables with the given names to the preference table container of a domain of Archicad 27 and returns their id, in one undo step. Only for Archicad 27.

Parameters:

Returns:

delete_mep_preference_table_rows

delete_mep_preference_table_rows(
    table_id: MEPPreferenceTableId,
    keys: list[MEPPreferenceRowKey],
) -> list[
    FailedExecutionResult | SuccessfulExecutionResult
]

Deletes rows of a segment, branch, elbow or (from Archicad 29) transition preference table by their key (the reference ids and, for branch and elbow rows from Archicad 29, the angle), in one undo step. The rows of segment tables, and of the elbow tables of Archicad 28, are emptied instead. On Archicad 27 a row is found by its shape and index. Available from Archicad 27.

Parameters:

  • table_id (MEPPreferenceTableId) –

    The guid of a preference table, as returned by GetMEPPreferenceTables (the branch, elbow and transition tables with includeFittingTables): a pipe or circular duct segment table, a branch or elbow table of the Piping or Ventilation domain, or, from Archicad 29, a transition table. Rectangular duct and cable carrier segment tables are found too, but their rows have no key. Archicad 27: any preference table, as returned by GetMEPPreferenceTableContainers.

  • keys (list[MEPPreferenceRowKey]) –

    The keys of the rows to delete. Segment tables, and the elbow tables of Archicad 28, have a row for each reference id, which is emptied instead. Archicad 27: the indices are those before the call; the rows are deleted from the highest index down.

Returns:

get_mep_preference_table_containers

get_mep_preference_table_containers(
    domains: None | list[MEPPreferenceTableDomain] = None,
) -> list[ErrorItem | MEPPreferenceTableContainer]

Lists the preference tables of the Piping, Ventilation and Cable Carrier preference table containers of Archicad 27: their id, name, whether they exist and their number of rows per shape, and whether the container exists. Only for Archicad 27; from Archicad 28 use GetMEPPreferenceTables.

Parameters:

  • domains (None | list[MEPPreferenceTableDomain], default: None ) –

    The domains whose preference tables to list. Defaults to all three.

Returns:

get_mep_preference_table_rows

get_mep_preference_table_rows(
    table_id: MEPPreferenceTableId,
    keys: list[MEPPreferenceRowKey],
) -> GetMEPPreferenceTableRowsResult

Gets rows of a segment, branch, elbow or (from Archicad 29) transition preference table by their key (the reference ids and, for branch and elbow rows from Archicad 29, the angle): whether the row is valid and its values (diameters, wall thickness, radius, length, angle, branch offset, connection length, description), and whether the table exists. Rectangular duct and cable carrier segment tables only give whether they exist, as their rows have no key. On Archicad 27, which has one kind of preference table, a row is found by its shape and index and has a value and a description; the table's name and number of rows per shape are returned too. Available from Archicad 27.

Parameters:

  • table_id (MEPPreferenceTableId) –

    The guid of a preference table, as returned by GetMEPPreferenceTables (the branch, elbow and transition tables with includeFittingTables): a pipe or circular duct segment table, a branch or elbow table of the Piping or Ventilation domain, or, from Archicad 29, a transition table. Rectangular duct and cable carrier segment tables are found too, but their rows have no key. Archicad 27: any preference table, as returned by GetMEPPreferenceTableContainers.

  • keys (list[MEPPreferenceRowKey]) –

    The keys of the rows to get.

Returns:

set_mep_preference_table_rows

set_mep_preference_table_rows(
    table_id: MEPPreferenceTableId,
    rows: list[MEPPreferenceRowUpdate],
) -> list[
    FailedExecutionResult | MEPPreferenceRowUpdateResult
]

Sets the given values of rows of a segment, branch, elbow or (from Archicad 29) transition preference table, found by their key (the reference ids and, for branch and elbow rows from Archicad 29, the angle). Only the given values are changed, in one undo step. On Archicad 27 a row is found by its shape and index, its value and description are set, and its index after the call is returned; the keys give the indices before the call. Available from Archicad 27.

Parameters:

  • table_id (MEPPreferenceTableId) –

    The guid of a preference table, as returned by GetMEPPreferenceTables (the branch, elbow and transition tables with includeFittingTables): a pipe or circular duct segment table, a branch or elbow table of the Piping or Ventilation domain, or, from Archicad 29, a transition table. Rectangular duct and cable carrier segment tables are found too, but their rows have no key. Archicad 27: any preference table, as returned by GetMEPPreferenceTableContainers.

  • rows (list[MEPPreferenceRowUpdate]) –

    The rows to change. Only the given values are set.

Returns:

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