05.03.2026 - 16:35
Uhr
[Lösung]
Hi Christian,
I just fount this funtion in one of my projects:
@staticmethod
def _find_clipping_box_uuid(uvs: AllplanElementAdapter.AssocViewElementAdapter) -> uuid.UUID:
"""Find the clipping box UUID associated with the given UVS using the associative framework
Args:
uvs: UVS element
Returns:
UUID of the clipping box
"""
filter_clipping_path = ElementFilter([AllplanElementAdapter.ClippingPath_TypeUUID])
uuid_gen = (uuid.UUID(str(ele.GetElementUUID())) for ele
in AllplanBaseElements.AssociationService.GetObservedElements(uvs.GetDocument(), uvs.GetElementUUID())
if filter_clipping_path(ele))
return next(uuid_gen, uuid.UUID(int=0))The function returns the UUID of the AllplanElementAdapter.ClippingPath_TypeUUID object, the UVS (AssocViewAdapter) is associated with. Simply adapt it to get the geometry instead of uuid. The geometry should be the Polyhedron.
Note that GetObservedElements was exposed to Python on some of the recent versions of ALLPLAN. In 2024, the code above probably won't work. It will in 2026, not sure about 2025.
Cheers,
Bart