17.10.2025 - 11:22
Uhr
*
Hi,
in Allplan 2024(and older), I used this code to extract profile geometry from a collection of library elements.
def make_profile_area_from_lib(path:str,name:str, type:AllplanBasisElements.LibraryElementType, placement_mat:AllplanGeo.Matrix3D,doc): """ Erstellt Profil Polygon aus Bibliothekselement. Mit Polygonisierung. Args: path: Pfad zum Element name: Name des Elements type: Type des Elements placement_mat: Platzierungsmatrix doc: Documentadapter des aktuellen Dokuments Returns: Polygon3D """ lib_ele_prop = AllplanBasisElements.LibraryElementProperties(path, "",name,type,placement_mat) be=AllplanBasisElements.LibraryElement(lib_ele_prop) path2d,poly3d=AllplanGeo.Path2D(),AllplanGeo.Polygon3D() for geo in be.GetGeometryElements(doc): if isinstance(geo,AllplanGeo.Arc2D): err,poly=AllplanGeo.PolygonizeEqually(geo,geo.GetStartPoint(),geo.GetEndPoint(),3) path2d+=poly else:path2d+=geo err,path3d=AllplanGeo.ConvertTo3D(path2d)
In 2025 it`s not working anymore. In 2024, same code with same libraryelements is working fine.
Any ideas? Thank you.