Building Element Palette Service
Class full path: BuildingElementPaletteService.BuildingElementPaletteService
Definition of class BuildingElementPaletteService
Functions
__init__(build_ele_list, build_ele_composite, build_ele_script, build_ele_ctrl_props_list, picture_path)
Initialize the data
Parameters:
Name | Type | Description | Default |
---|---|---|---|
build_ele_list
|
List[BuildingElement]
|
list with the building elements |
required |
build_ele_composite
|
BuildingElementComposite
|
building element composite with the building element constraints |
required |
build_ele_script
|
Any
|
Building element script |
required |
build_ele_ctrl_props_list
|
List[BuildingElementControlProperties]
|
list with the building element control properties |
required |
picture_path
|
str
|
Picture path |
required |
check_building_element_index()
Check the building element index (e.g. set to 0 for hidden elements)
close_palette()
Close the palette
Returns:
Type | Description |
---|---|
str
|
text of the active page |
get_control_text()
Get the control data as text
Returns:
Type | Description |
---|---|
str
|
Controls data as text |
modify_element_property(page, name, value)
Modify property of element
Parameters:
Name | Type | Description | Default |
---|---|---|---|
page
|
int
|
description |
required |
name
|
str
|
the name of the property. |
required |
value
|
Any
|
new value for property. |
required |
Returns:
Type | Description |
---|---|
bool
|
update palette state |
on_control_event(event_id)
On control event
Parameters:
Name | Type | Description | Default |
---|---|---|---|
event_id
|
int
|
event id of control. |
required |
Returns:
Type | Description |
---|---|
bool
|
event was processed state |
refresh_palette(build_ele_list, build_ele_ctrl_props_list)
refresh the palette
Parameters:
Name | Type | Description | Default |
---|---|---|---|
build_ele_list
|
List[BuildingElement]
|
Building element list |
required |
build_ele_ctrl_props_list
|
List[BuildingElementControlProperties]
|
Control properties list |
required |
set_building_element_index(index, script_name)
Set the building element index
Parameters:
Name | Type | Description | Default |
---|---|---|---|
index
|
int
|
Element index |
required |
script_name
|
str
|
Script name |
required |
set_palette_lock(palette_lock)
staticmethod
set the palette lock state
show_page_for_element(act_page, build_ele_index_list)
Show the page for the element_index
Parameters:
Name | Type | Description | Default |
---|---|---|---|
act_page
|
int
|
active page index |
required |
build_ele_index_list
|
List[int]
|
index list with the connected building elements (geometry, reinforcement, ...) of a sub element |
required |
show_palette(part_name, show_close_button=True, open_palette=True, active_page_text='', is_visual_script=False)
Show the palette
Parameters:
Name | Type | Description | Default |
---|---|---|---|
part_name
|
str
|
Name of the PythonPart |
required |
show_close_button
|
bool
|
Show close button in palette |
True
|
open_palette
|
bool
|
open the palette |
True
|
active_page_text
|
str
|
active page text |
''
|
is_visual_script
|
bool
|
execution for VisualScripting |
False
|
update_palette(page_index, update_dialog_data, _show_palette_close_btn=True)
Update the palette
Parameters:
Name | Type | Description | Default |
---|---|---|---|
page_index
|
int
|
page index to show, -1 = use current |
required |
update_dialog_data
|
bool
|
update the dialog data: True/False |
required |
_show_palette_close_btn
|
show close button in palette: True/False |
True
|