31.03.2026 - 04:18
Hallo zusammen
bis Allplan 2024 war es möglich, mit dem untenstehenden Code einen Symbolpunkt inklusive Beschriftung zu erstellen.
In Allplan 2025 und 2026 funktioniert dies leider nicht mehr. Die Beschriftung wird in Allplan nicht mehr erstellt.
Gibt es hierfür einen Workaround oder eine alternative Vorgehensweise, um die Beschriftung mit dem Symbolpunkt zu erzeugen?
import NemAll_Python_Geometry as AllplanGeo
import NemAll_Python_BaseElements as AllplanBaseElements
import NemAll_Python_BasisElements as AllplanBasisElements
def sym_lbl(pnt:AllplanGeo.Point3D):
com_prop = AllplanBaseElements.CommonProperties()
symbol_prop = AllplanBasisElements.Symbol3DProperties()
loc_sym = AllplanGeo.Point3D(pnt)
loc_lbl = AllplanGeo.Point2D(loc_sym.X+100, loc_sym.Y+100)
text_lbl = "%D3%FA4.3%FE#KZ1#"
symbol_ele = AllplanBasisElements.Symbol3DElement(com_prop, symbol_prop, loc_sym)
text_prop = AllplanBasisElements.TextProperties()
text_prop.Type = AllplanBasisElements.TextType.eFormularText
text_ele = AllplanBasisElements.TextElement(com_prop, text_prop, text_lbl, loc_lbl)
label_lst = []
label_lst.append (AllplanBasisElements.LabelElement(text_ele, AllplanBasisElements.eLabelNormalText))
symbol_ele.SetLabelElements(label_lst)
return symbol_ele
Gruss und Dank
Hansruedi