VisualScriptService
Canonical path: VisualScriptService.VisualScriptService
implementation of the VisualScript service
Methods:
-
__init__
–Initialize the script
-
close_all
–close the VS script
-
create_pythonpart
–create the PythonPart
-
execute_load_favorite
–load the favorite data
-
execute_save_favorite
–save the favorite data
-
get_preview_elements
–get the preview elements created by the script
-
modify_element_property
–Modify property of element
-
on_cancel_function
–Check for input function cancel in case of ESC
-
on_control_event
–Handles on control event
-
reset_param_values
–reset the parameter values
__init__
__init__(
coord_input: CoordinateInput,
script_path: str,
global_str_table_service: StringTableService,
build_ele_list: List[BuildingElement],
control_props_list: List[BuildingElementControlProperties],
default_values: List[DefaultValue],
)
Initialize the script
Parameters:
-
coord_input
(CoordinateInput
) –coordinate input
-
script_path
(str
) –script path
-
global_str_table_service
(StringTableService
) –global string table service
-
build_ele_list
(List[BuildingElement]
) –building element list
-
control_props_list
(List[BuildingElementControlProperties]
) –control properties list
-
default_values
(List[DefaultValue]
) –default values
create_pythonpart
get_preview_elements
get the preview elements created by the script
Returns:
-
List[Any]
–preview elements of the script
modify_element_property
Modify property of element
Parameters:
-
page
(int
) –the page of the property
-
name
(str
) –the name of the property.
-
value
(Any
) –new value for property.
on_cancel_function
Check for input function cancel in case of ESC
Returns:
-
bool
–True/False for success.
on_control_event
Handles on control event
Parameters:
-
event_id
(int
) –event id of control.