Skip to content

PythonPartUtil

Implementation of the PythonPart utilities

PythonPartUtil

Canonical path: PythonPartUtil.PythonPartUtil

Implementation of the PythonPart utilities

__init__

__init__(common_props: CommonProperties | None = None)

Initialize

Parameters:

add_architecture_elements

add_architecture_elements(elements: Any)

Add the architecture elements to the PythonPart. The elements will be appended as CHILD-elements.

Parameters:

  • elements (Any) –

    architecture elements

add_assemblygroup_elements

add_assemblygroup_elements(elements: Any)

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:

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:

add_fixture_elements

add_fixture_elements(elements: Any)

Add the fixture elements to the PythonPart. The elements will be appended as CHILD-elements.

Parameters:

  • elements (Any) –

    fixture elements

add_label_elements

add_label_elements(elements: Any)

Add the label elements to the PythonPart.

Parameters:

  • elements (Any) –

    label elements

add_library_elements

add_library_elements(elements: Any)

Add the library elements to the PythonPart. The elements will be appended as CHILD-elements.

Parameters:

  • elements (Any) –

    library elements

add_mwsgroup_elements

add_mwsgroup_elements(elements: Any)

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:

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:

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:

add_reinforcement_elements

add_reinforcement_elements(elements: Any)

Add the reinforcement elements to the PythonPart. The elements will be appended as CHILD-elements.

Parameters:

  • elements (Any) –

    reinforcement elements

add_view

add_view(elements: View | list[View])

Add a view for the next PythonPart.

Parameters:

  • elements (View | list[View]) –

    elements

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:

set_view_data staticmethod

set_view_data(view: View, view_data: PythonPartViewData)

set the view data

Parameters:

Placeholder