Skip to content

Building Element List Service

Class full path: BuildingElementListService.BuildingElementListService

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

Functions

get_hash(build_ele_list) staticmethod

Calculate a hash value for script name and parameter list

Parameters:

Name Type Description Default
build_ele_list List[BuildingElement]

list with the building elements

required

Returns:

Type Description
str

Calculated hash string.

get_params_list(build_ele_list, persistence=MODEL, exclude_parameter_names=None) staticmethod

Get the parameter list of the building elements

Parameters:

Name Type Description Default
build_ele_list List[BuildingElement]

list with the building elements

required
persistence Persistent

persistence to check

MODEL
exclude_parameter_names Optional[List[str]]

excluded parameter names from the list

None

Returns:

Type Description
List[str]

Parameter list

migrate_fav_data(fav_param_list, build_ele_list, script) staticmethod

Migrate the favorite data

Parameters:

Name Type Description Default
fav_param_list List[str]

List with the parameter data

required
build_ele_list List[BuildingElement]

list with the building elements

required
script Any

script

required

read_fav_data(fav_param_list, build_ele_list, persistence=MODEL, is_modification_mode=True, script=None) staticmethod

Read the data from a favorite parameter list

Parameters:

Name Type Description Default
fav_param_list List[str]

List with the favorite parameter

required
build_ele_list List[BuildingElement]

list with the building elements

required
persistence Persistent

Parameter persistency, for which the data should be read

MODEL
is_modification_mode bool

Read the data for the PythonPart modification, True/False

True
script Any

script

None

read_from_default_favorite_file(build_ele_list) staticmethod

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:

Name Type Description Default
build_ele_list List[BuildingElement]

list with the building elements

required

read_from_file(file_name, build_ele_list) staticmethod

Read the properties from a file

Parameters:

Name Type Description Default
file_name str

Name of the file

required
build_ele_list List[BuildingElement]

list with the building elements

required

write_to_default_favorite_file(build_ele_list) staticmethod

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:

Name Type Description Default
build_ele_list List[BuildingElement]

list with the building elements

required

write_to_file(file_name, build_ele_list) staticmethod

Write the properties to a file

Parameters:

Name Type Description Default
file_name str

Name of the file

required
build_ele_list List[BuildingElement]

list with the building elements

required