PythonPartUtil
Implementation of the PythonPart utilities
PythonPartUtil
Canonical path: PythonPartUtil.PythonPartUtil
Implementation of the PythonPart utilities
__init__
__init__(common_props: CommonProperties | None = None)
add_architecture_elements
Add the architecture elements to the PythonPart. The elements will be appended as CHILD-elements.
Parameters:
-
elements(ALLPLAN_ELE) –architecture elements
add_assemblygroup_elements
Add the library elements to the PythonPart. The elements will be appended as CHILD-elements.
Parameters:
-
elements(ALLPLAN_ELE) –library elements
add_attribute_list
add_attribute_list(attribute_list: BuildingElementAttributeList)
Add the attribute list to the PythonPart
Parameters:
-
attribute_list(BuildingElementAttributeList) –attribute list
add_attribute_list_to_sub_element_in_structured_container
add_attribute_list_to_sub_element_in_structured_container(
attribute_list: BuildingElementAttributeList, object_id: UUID = UUID(int=0)
)
Add attribute list to sub element of StructuredContainer to the PythonPart
Parameters:
-
attribute_list(BuildingElementAttributeList) –attribute list
-
object_id(UUID, default:UUID(int=0)) –logical object id
add_fixture_elements
Add the fixture elements to the PythonPart. The elements will be appended as CHILD-elements.
Parameters:
-
elements(ALLPLAN_ELE) –fixture elements
add_label_elements
Add the label elements to the PythonPart.
Parameters:
-
elements(ALLPLAN_ELE) –label elements
add_library_elements
Add the library elements to the PythonPart. The elements will be appended as CHILD-elements.
Parameters:
-
elements(ALLPLAN_ELE) –library elements
add_mwsgroup_elements
Add the library elements to the PythonPart. The elements will be appended as CHILD-elements.
Parameters:
-
elements(ALLPLAN_ELE) –library elements
add_pythonpart_view_2d
add_pythonpart_view_2d(
elements: ALLPLAN_ELE, view_data: PythonPartViewData = PythonPartViewData()
)
Add the elements to a 2D view for the next PythonPart. Elements added to this view will be visible only in a ground view.
Parameters:
-
elements(ALLPLAN_ELE) –elements
-
view_data(PythonPartViewData, default:PythonPartViewData()) –view data
add_pythonpart_view_2d3d
add_pythonpart_view_2d3d(
elements: ALLPLAN_ELE, view_data: PythonPartViewData = PythonPartViewData()
)
Add the elements to a 2D3D view for the next PythonPart. Elements added to this view will be visible in both ground and isometric view.
Parameters:
-
elements(ALLPLAN_ELE) –elements
-
view_data(PythonPartViewData, default:PythonPartViewData()) –view data
add_pythonpart_view_3d
add_pythonpart_view_3d(
elements: ALLPLAN_ELE, view_data: PythonPartViewData = PythonPartViewData()
)
Add the elements to a 3D view for the next PythonPart. Elements added to this view will be visible only in an isometric view.
Parameters:
-
elements(ALLPLAN_ELE) –elements
-
view_data(PythonPartViewData, default:PythonPartViewData()) –view data
add_reinforcement_elements
Add the reinforcement elements to the PythonPart. The elements will be appended as CHILD-elements.
Parameters:
-
elements(ALLPLAN_ELE) –reinforcement elements
add_view
create_pythonpart
create_pythonpart(
build_ele: BuildingElement | list[BuildingElement],
local_placement_matrix: Matrix3D = Matrix3D(),
placement_matrix: Matrix3D = Matrix3D(),
type_uuid: str = "",
type_display_name: str = "",
) -> ModelEleList
create a PythonPart with the current views
Parameters:
-
build_ele(BuildingElement | list[BuildingElement]) –building element with the parameter properties
-
local_placement_matrix(Matrix3D, default:Matrix3D()) –local placement matrix of the PythonPart, used for the local geometry transformation
-
placement_matrix(Matrix3D, default:Matrix3D()) –placement matrix of the PythonPart (model placement)
-
type_uuid(str, default:'') –define the selectable type
-
type_display_name(str, default:'') –display name for the tooltip and object palette
Returns:
-
ModelEleList–list with the created PythonPart elements
get_pythonpart
get_pythonpart(
build_ele: BuildingElement | list[BuildingElement],
local_placement_matrix: Matrix3D = Matrix3D(),
placement_matrix: Matrix3D = Matrix3D(),
type_uuid: str = "",
type_display_name: str = "",
) -> PythonPart
get the PythonPart
Parameters:
-
build_ele(BuildingElement | list[BuildingElement]) –building element with the parameter properties
-
local_placement_matrix(Matrix3D, default:Matrix3D()) –local placement matrix of the PythonPart, used for the local geometry transformation
-
placement_matrix(Matrix3D, default:Matrix3D()) –placement matrix of the PythonPart (model placement)
-
type_uuid(str, default:'') –define the selectable type
-
type_display_name(str, default:'') –display name for the tooltip and object palette
Returns:
-
PythonPart–created PythonPart
set_view_data
staticmethod
set_view_data(view: View, view_data: PythonPartViewData)