Building Element Material String Table
Class full path: BuildingElementMaterialStringTable.BuildingElementMaterialStringTable
Bases: BuildingElementStringTableBase
Definition of class MaterialStringTable
Functions
__init__(path, numeric, lang)
Initialization of class StringTable
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path
|
str
|
path of according .py file. The file name will be set internally to _xyz.xml |
required |
numeric
|
bool
|
the string table will be created only from numeric (123..) text ids or not numeric text ids (e_THE_VALUE) |
required |
lang
|
str
|
language short cut |
required |
add_entry(val_number, val_str)
Creates an string table entry
Parameters:
Name | Type | Description | Default |
---|---|---|---|
val_number
|
str
|
index number in the list |
required |
val_str
|
str
|
string value |
required |
Returns:
Type | Description |
---|---|
bool
|
True for success |
bool
|
False if number already exists |
get_entry(str_val_number)
Returns an string table entry
Parameters:
Name | Type | Description | Default |
---|---|---|---|
str_val_number
|
str
|
value or number of the string |
required |
Returns:
Type | Description |
---|---|
Tuple[str, bool]
|
(string result, True/False for success) |