Skip to content

BuildingElementMaterialStringTable

Script for BuildingElementMaterialStringTable

BuildingElementMaterialStringTable

Canonical path: BuildingElementMaterialStringTable.BuildingElementMaterialStringTable

Bases: BuildingElementStringTableBase

Definition of class MaterialStringTable

__init__

__init__(path: str, numeric: bool, lang: str)

Initialization of class StringTable

Parameters:

  • path (str) –

    path of according .py file. The file name will be set internally to _xyz.xml

  • numeric (bool) –

    the string table will be created only from numeric (123..) text ids or not numeric text ids (e_THE_VALUE)

  • lang (str) –

    language short cut

add_entry

add_entry(val_number: str, val_str: str) -> bool

Creates an string table entry

Parameters:

  • val_number (str) –

    index number in the list

  • val_str (str) –

    string value

Returns:

  • bool

    True for success

  • bool

    False if number already exists

get_entry

get_entry(str_val_number: str) -> Tuple[str, bool]

Returns an string table entry

Parameters:

  • str_val_number (str) –

    value or number of the string

Returns:

  • Tuple[str, bool]

    (string result, True/False for success)