PythonPartGroup
Canonical path: PythonPart.PythonPartGroup
Definition of a PythonPart group
pythonparts
property
pythonparts: list[PythonPart]
__init__
__init__(
name: str,
parameter_list: list[str],
hash_value: str,
python_file: str,
pythonparts: list[PythonPart] | None = None,
type_uuid: str = "",
type_display_name: str = "",
)
Initialize
Args:
name: name
parameter_list: parameter list
hash_value: hash value of the parameter
python_file: name of the pyp file
pythonparts: list with the PythonParts to put into group
type_uuid: define the selectable type defines the selectable type
type_display_name: display name for the tooltip and object palette
Raises:
TypeError: When list of PythonParts to group contains a non-PythonPart object
append
append(pythonpart: PythonPart)
create
create() -> list[AllplanElement]
create the PythonPartGroup
Returns:
-
list[AllplanElement]
–list with the created elements for the PythonPartGroup
extend
extend(pythonparts: list[PythonPart])
Extend the group with new PythonParts
Parameters:
-
pythonparts
(list[PythonPart]
) –list of PythonParts to add to the group
from_build_ele
classmethod
from_build_ele(
build_ele: BuildingElement,
name: str = "",
pythonparts: list[PythonPart] | None = None,
type_uuid: str = "",
type_display_name: str = "",
) -> PythonPartGroup
Initialize the PythonPart group from a BuildingElement
Parameters:
-
build_ele
(BuildingElement
) –Building element containing parameter values of the PythonPart group
-
name
(str
, default:''
) –Name of the group. If not provided, the name of the .pyp file will be used
-
pythonparts
(list[PythonPart] | None
, default:None
) –List of PythonParts to put into group. You can initialize an empty group and append PythonParts to it using append() or extend()
-
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
Returns:
-
PythonPartGroup
–Constructed PythonPart group
Raises:
-
TypeError
–When list of PythonParts to group contains a non-PythonPart object