Hello,
I'm generating walls in a PythonPart without problems, with some configurations like a custom layer, a tier of type called "Concreting work" or a plane reference with a height from the bottom. Everything seems to work fine till this point, however, when I try to attach an attribute to the wall, the generated wall in Allplan does not have the attribute, ignoring the configuration done code-behind. I've tried different ways to do so, taking as reference some existing examples, although they are all for 3D Objects since I've found no examples with walls.
Attached to this issue I add the class I use to create a Wall, which is called from the main script as follows:
def create_element(self):
python_part_util = PythonPartUtil()
python_part_util.add_architecture_elements([self.create_test_wall(AllplanGeo.Point3D(3600,0,0), 1)])
pyp_transaction = PythonPartTransaction(self.coord_input.GetActiveViewDocument())
base_elems = pyp_transaction.execute(
placement_matrix= AllplanGeo.Matrix3D(),
view_world_projection= AllplanIFW.ViewWorldProjection(),
model_ele_list=
python_part_util.create_pythonpart(
self.build_ele_list,
type_display_name = "PythonPart Parent with child objects",
placement_matrix=self.placement_mat
),
modification_ele_list= ModificationElementList(),
uuid_parameter_name = "test_uuid"
)
def create_test_wall(self, input_pnt: AllplanGeo.Point3D, index: int):
self.wall = Wall_PP(
self.coord_input.GetInputViewDocument(),
random.random() * 3600,
input_pnt,
1196,
120,
2996,
index,
True,
False)
return self.wall.wall_element()
The fragment of the attribute attachment:
wall = AllplanArchElements.WallElement(self.wall_prop, self.wall_axis)
attribute_list = []
attr_list = []
attr_list.append(AllplanBaseElements.AttributeString(1083, "3000x1200x120mm"))
attr_set_list = []
attr_set_list.append(AllplanBaseElements.AttributeSet(attr_list))
attributes = AllplanBaseElements.Attributes(attr_set_list)
wall.Attributes = attributes