Skip to content

BuildingElementPaletteService

Implementation of the building element palette service

BuildingElementPaletteService

Canonical path: BuildingElementPaletteService.BuildingElementPaletteService

Definition of class BuildingElementPaletteService

__init__

__init__(
    build_ele_list: list[BuildingElement],
    build_ele_composite: BuildingElementComposite,
    build_ele_script: Any,
    build_ele_ctrl_props_list: list[BuildingElementControlProperties],
    picture_path: str,
    script_object: BaseScriptObject | None = None,
)

Initialize the data

Parameters:

  • build_ele_list (list[BuildingElement]) –

    list with the building elements

  • build_ele_composite (BuildingElementComposite) –

    building element composite with the building element constraints

  • build_ele_script (Any) –

    Building element script

  • build_ele_ctrl_props_list (list[BuildingElementControlProperties]) –

    list with the building element control properties

  • picture_path (str) –

    Picture path

  • script_object (BaseScriptObject | None, default: None ) –

    script object

check_building_element_index

check_building_element_index()

Check the building element index (e.g. set to 0 for hidden elements)

close_palette

close_palette() -> str

Close the palette

Returns:

  • str

    text of the active page

get_control_text

get_control_text() -> str

Get the control data as text

Returns:

  • str

    Controls data as text

modify_element_property

modify_element_property(page: int, name: str, value: Any) -> bool

Modify property of element

Parameters:

  • page (int) –

    description

  • name (str) –

    the name of the property.

  • value (Any) –

    new value for property.

Returns:

  • bool

    update palette state

on_control_event

on_control_event(event_id: int) -> bool

On control event

Parameters:

  • event_id (int) –

    event id of control.

Returns:

  • bool

    event was processed state

refresh_palette

refresh_palette(
    build_ele_list: list[BuildingElement],
    build_ele_ctrl_props_list: list[BuildingElementControlProperties],
)

refresh the palette

Parameters:

set_building_element_index

set_building_element_index(index: int, script_name: str)

Set the building element index

Parameters:

  • index (int) –

    Element index

  • script_name (str) –

    Script name

set_palette_lock staticmethod

set_palette_lock(palette_lock: bool)

set the palette lock state

Parameters:

  • palette_lock (bool) –

    palette lock state

set_update_lock staticmethod

set_update_lock(update_lock: bool)

set the palette lock state

Parameters:

  • update_lock (bool) –

    palette lock state

show_page_for_element

show_page_for_element(act_page: int, build_ele_index_list: list[int])

Show the page for the element_index

Parameters:

  • act_page (int) –

    active page index

  • build_ele_index_list (list[int]) –

    index list with the connected building elements (geometry, reinforcement, ...) of a sub element

show_palette

show_palette(
    part_name: str,
    show_close_button: bool = True,
    open_palette: bool = True,
    active_page_text: str = "",
    is_visual_script: bool = False,
)

Show the palette

Parameters:

  • part_name (str) –

    Name of the PythonPart

  • show_close_button (bool, default: True ) –

    Show close button in palette

  • open_palette (bool, default: True ) –

    open the palette

  • active_page_text (str, default: '' ) –

    active page text

  • is_visual_script (bool, default: False ) –

    execution for VisualScripting

update_palette

update_palette(
    page_index: int, update_dialog_data: bool, _show_palette_close_btn=True
)

Update the palette

Parameters:

  • page_index (int) –

    page index to show, -1 = use current

  • update_dialog_data (bool) –

    update the dialog data: True/False

  • _show_palette_close_btn

    show close button in palette: True/False

Placeholder