Hello,
with your definition of X,Y,Z parameter for the coordinates, the correct implementation would be:
def create_element(build_ele: BuildingElement,
doc: AllplanElementAdapter.DocumentAdapter) -> CreateElementResult:
point = AllplanGeometry.Point3D(x = build_ele.Punkt1_X.value,
y = build_ele.Punkt1_Y.value,
z = build_ele.Punkt1_Z.value)
point_symbol_properties = AllplanBasisElements.Symbol3DProperties()
common_props = AllplanSettings.AllplanGlobalSettings.GetCurrentCommonProperties()
point_symbol = AllplanBasisElements.Symbol3DElement(common_props,point_symbol_properties,point)
model_ele_list = ModelEleList()
model_ele_list.append(point_symbol)
return CreateElementResult(model_ele_list,placement_point= AllplanGeometry.Point3D())
The reason your implementation didn't work is because you tried to use the GetCoords as a point constructor. But this an instance method - you need an object instance (a point) to call it on this instance. Proper usage would be:
x, y, z = point.GetCoords()
Assuming you would have fixed this problem, the next is, that you used the point in the append_geometry_3d. This method does not accept a Point3D as an argument. It would throw a type error.
If you want to create a point in Allplan, you need to create a Terrain Point. In the API , it is represented by Symbol3DElement. So you have to construct an instance of this class. But it need more, than just a point. It also needs common properties (so Allplan knows with which pen/stroke and color to draw the point) and Symbol3DProperties so Allplan knows, which symbol to use to draw the Point (a cross, a point, a circle, etc...).
Hope that helps.
Best,
Bart