Skip to content

StringTableService

Implementation of the string table service

StringTableService

Canonical path: StringTableService.StringTableService

Definition of class StringTableService

material_str_table property

get the material string table

Returns:

str_table property

get the string table

Returns:

__init__

__init__(path: str)

Initialize the data

Parameters:

  • path (str) –

    Path to string table folder.

get_string

get_string(string_id: str, string: str) -> str

Get a string from the table

Returns:

  • str

    String from the ID if exist, default string otherwise

Parameters:

  • string_id (str) –

    String ID (if empty, take it for {...} part of the string

  • string (str) –

    Default string in case of no existing ID

get_string_table_entry staticmethod

get_string_table_entry(
    string_table: BuildingElementStringTable, string_id: str, string: str
) -> str

Get a string from the table

Returns:

  • str

    String from the ID if exist, default string otherwise

Parameters:

  • string_table (BuildingElementStringTable) –

    string table

  • string_id (str) –

    String ID (if empty, take it for {...} part of the string

  • string (str) –

    Default string in case of no existing ID

Placeholder