Skip to content

PythonPart

Canonical path: PythonPart.PythonPart

Definition of class PythonPart

matrix property writable

matrix: Matrix3D

Transformation matrix used for local transformation of the PythonPart

Returns:

placement_matrix property writable

placement_matrix: Matrix3D | None

Placement matrix

Returns:

views property

views: list[View]

Get the views

Returns:

  • list[View]

    views

__init__

__init__(
    name: str,
    parameter_list: list[str],
    hash_value: str,
    python_file: str,
    views: list[View2D | View3D | View2D3D] | None = None,
    matrix: Matrix3D = AllplanGeo.Matrix3D(),
    common_props: CommonProperties | None = None,
    reinforcement: list[Any] | None = None,
    attribute_list: list[Any] | None = None,
    library_elements: list[Any] | None = None,
    architecture_elements: list[Any] | None = None,
    label_elements: list[Any] | None = None,
    fixture_elements: list[Any] | None = None,
    assembly_elements: list[Any] | None = None,
    mws_elements: list[Any] | None = None,
    placement_matrix: Matrix3D | None = None,
    type_uuid: str = "",
    type_display_name: str = "",
    structured_container_attributes: dict[
        UUID, BuildingElementAttributeList
    ] = {},
)

Initialization of class PythonPart

Parameters:

  • name (str) –

    name of the modified property

  • parameter_list (list[str]) –

    list with the parameter

  • hash_value (str) –

    Hash value of the parameter

  • python_file (str) –

    File name of the pyp file

  • views (list[View2D | View3D | View2D3D] | None, default: None ) –

    Views for PythonPart

  • matrix (Matrix3D, default: Matrix3D() ) –

    Local matrix of PythonPart, used for the local geometry transformation

  • common_props (CommonProperties | None, default: None ) –

    Common properties of PythonPart

  • reinforcement (list[Any] | None, default: None ) –

    Reinforcement elements for PythonPart

  • attribute_list (list[Any] | None, default: None ) –

    Attribute list

  • library_elements (list[Any] | None, default: None ) –

    Library elements for PythonPart

  • architecture_elements (list[Any] | None, default: None ) –

    Architecture elements for PythonPart

  • label_elements (list[Any] | None, default: None ) –

    Label elements

  • fixture_elements (list[Any] | None, default: None ) –

    Fixture elements for PythonPart

  • assembly_elements (list[Any] | None, default: None ) –

    assembly element

  • mws_elements (list[Any] | None, default: None ) –

    mvs elements

  • placement_matrix (Matrix3D | None, default: None ) –

    Placement matrix of the PythonPart

  • type_uuid (str, default: '' ) –

    define the selectable type defines the selectable type

  • type_display_name (str, default: '' ) –

    display name for the tooltip and object palette

  • structured_container_attributes (dict[UUID, BuildingElementAttributeList], default: {} ) –

    attributes for StructuredContainer

__repr__

__repr__() -> str

create the element string

Returns:

  • str

    element string

add

add(view: View)

Add one view

Parameters:

  • view (View) –

    view

create

create() -> list[AllplanElement]

create the PythonPart

Returns:

distortion_state

distortion_state(state: bool)

Set distortion state

Parameters:

  • state (bool) –

    distortion state

leading_macro

leading_macro(macro_leading: bool)

Set leading macro

Parameters:

  • macro_leading (bool) –

    leading macro state

reset

reset(views: list[View])

Reset views

Parameters:

  • views (list[View]) –

    views

Placeholder