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
(Any
) –architecture elements
add_assemblygroup_elements
Add the library elements to the PythonPart. The elements will be appended as CHILD-elements.
Parameters:
-
elements
(Any
) –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.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
(Any
) –fixture elements
add_label_elements
Add the label elements to the PythonPart.
Parameters:
-
elements
(Any
) –label elements
add_library_elements
Add the library elements to the PythonPart. The elements will be appended as CHILD-elements.
Parameters:
-
elements
(Any
) –library elements
add_mwsgroup_elements
Add the library elements to the PythonPart. The elements will be appended as CHILD-elements.
Parameters:
-
elements
(Any
) –library elements
add_pythonpart_view_2d
add_pythonpart_view_2d(
elements: ModelElement2D | ModelElement3D | Any,
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
(ModelElement2D | ModelElement3D | Any
) –elements
-
view_data
(PythonPartViewData
, default:PythonPartViewData()
) –view data
add_pythonpart_view_2d3d
add_pythonpart_view_2d3d(
elements: ModelElement2D | ModelElement3D | Any,
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
(ModelElement2D | ModelElement3D | Any
) –elements
-
view_data
(PythonPartViewData
, default:PythonPartViewData()
) –view data
add_pythonpart_view_3d
add_pythonpart_view_3d(
elements: ModelElement2D | ModelElement3D | Any,
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
(ModelElement2D | ModelElement3D | Any
) –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
(Any
) –reinforcement elements
add_view
create_pythonpart
create_pythonpart(
build_ele: BuildingElement | list[BuildingElement],
local_placement_matrix: Matrix3D = AllplanGeo.Matrix3D(),
placement_matrix: Matrix3D = AllplanGeo.Matrix3D(),
type_uuid: str = "",
type_display_name: str = "",
) -> list[Any]
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:
-
list[Any]
–list with the created PythonPart elements
get_pythonpart
get_pythonpart(
build_ele: BuildingElement | list[BuildingElement],
local_placement_matrix: Matrix3D = AllplanGeo.Matrix3D(),
placement_matrix: Matrix3D = AllplanGeo.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)