Skip to content

BuildingElementListService

Implementation of the build element list service

BuildingElementListService

Canonical path: BuildingElementListService.BuildingElementListService

Implementation of functions for managing the data in a list of BuildingElements

get_hash staticmethod

get_hash(build_ele_list: list[BuildingElement]) -> str

Calculate a hash value for script name and parameter list

Parameters:

  • build_ele_list (list[BuildingElement]) –

    list with the building elements

Returns:

  • str

    Calculated hash string.

get_params_list staticmethod

get_params_list(
    build_ele_list: list[BuildingElement],
    persistence: Persistent = ParameterProperty.Persistent.MODEL,
    exclude_parameter_names: list[str] | None = None,
) -> list[str]

Get the parameter list of the building elements

Parameters:

  • build_ele_list (list[BuildingElement]) –

    list with the building elements

  • persistence (Persistent, default: MODEL ) –

    persistence to check

  • exclude_parameter_names (list[str] | None, default: None ) –

    excluded parameter names from the list

Returns:

  • list[str]

    Parameter list

migrate_fav_data staticmethod

migrate_fav_data(
    fav_param_list: list[str],
    build_ele_list: list[BuildingElement],
    script: Any,
)

Migrate the favorite data

Parameters:

  • fav_param_list (list[str]) –

    list with the parameter data

  • build_ele_list (list[BuildingElement]) –

    list with the building elements

  • script (Any) –

    script

read_fav_data staticmethod

read_fav_data(
    fav_param_list: list[str],
    build_ele_list: list[BuildingElement],
    persistence: Persistent = ParameterProperty.Persistent.MODEL,
    is_modification_mode: bool = True,
    script: Any = None,
)

Read the data from a favorite parameter list

Parameters:

  • fav_param_list (list[str]) –

    list with the favorite parameter

  • build_ele_list (list[BuildingElement]) –

    list with the building elements

  • persistence (Persistent, default: MODEL ) –

    Parameter persistency, for which the data should be read

  • is_modification_mode (bool, default: True ) –

    Read the data for the PythonPart modification, True/False

  • script (Any, default: None ) –

    script

read_from_default_favorite_file staticmethod

read_from_default_favorite_file(build_ele_list: list[BuildingElement])

The parameter values are read from the default favorite file and assigned to the parameters in build_ele_list. The file is located in the Allplan ".../usr/local/tmp" directory and the extension of the file is "pyv"

Parameters:

  • build_ele_list (list[BuildingElement]) –

    list with the building elements

read_from_file staticmethod

read_from_file(file_name: str, build_ele_list: list[BuildingElement])

Read the properties from a file

Parameters:

  • file_name (str) –

    Name of the file

  • build_ele_list (list[BuildingElement]) –

    list with the building elements

reset_param_values staticmethod

reset_param_values(build_ele_list: list[BuildingElement])

Reset to original parameter values from pyp file

Parameters:

  • build_ele_list (list[BuildingElement]) –

    list with the building elements

write_to_default_favorite_file staticmethod

write_to_default_favorite_file(build_ele_list: list[BuildingElement])

The parameter values are taken from build_ele_list and written to the default favorite file. The file is located in the Allplan ".../usr/local/tmp" directory and the extension of the file is "pyv"

Parameters:

  • build_ele_list (list[BuildingElement]) –

    list with the building elements

write_to_file staticmethod

write_to_file(file_name: str, build_ele_list: list[BuildingElement])

Write the properties to a file

Parameters:

  • file_name (str) –

    Name of the file

  • build_ele_list (list[BuildingElement]) –

    list with the building elements

Placeholder