icon

[Frage] Beschriftung Symbolpunkt in Allplan 2025

Schlagworte:
  • PythonParts
  • Symbol3DElement
  • LabelElement
  • SetLabelElements
  • TextElement
  • 2025
  • 2026

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

Hallo Hansruedi,

es könnte ein Problem sein, der unter der Python API sein Ursprung hat. Ich habe bei meinen Kollegen nachgefragt, ob es einen Workaround gäbe. Wenn ich rückmeldung bekomme, poste ich hier.

Grüße,
Bart