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 the building element index (e.g. set to 0 for hidden elements)
get_control_text
Get the control data as text
Returns:
-
str
–Controls data as text
modify_element_property
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
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:
-
build_ele_list
(list[BuildingElement]
) –Building element list
-
build_ele_ctrl_props_list
(list[BuildingElementControlProperties]
) –Control properties list
set_building_element_index
Set the building element index
Parameters:
-
index
(int
) –Element index
-
script_name
(str
) –Script name
set_palette_lock
staticmethod
set the palette lock state
Parameters:
-
palette_lock
(bool
) –palette lock state
set_update_lock
staticmethod
set the palette lock state
Parameters:
-
update_lock
(bool
) –palette lock state
show_page_for_element
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 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