Fix failing aggregate duplication test after 17d6b8a

This commit is contained in:
Andrej730
2025-11-11 17:28:03 +05:00
parent 71e78c67f8
commit f643a1615e
2 changed files with 4 additions and 3 deletions
@@ -1320,7 +1320,7 @@ class DuplicateMoveLinkedAggregate(bpy.types.Operator):
)
pset = ifcopenshell.util.element.get_pset(new[0], "BBIM_Linked_Aggregate")
new_obj = tool.Ifc.get_object(new[0])
new_obj.name = pset["Name"] + "_" + str(pset["Aggregate_Index"])
new_obj.name = f"{pset['Name']}_{pset['Aggregate_Index']:02d}"
def get_max_index(parts):
psets = [
+3 -2
View File
@@ -579,8 +579,9 @@ Scenario: Duplicate linked aggregate
When I duplicate linked aggregate the selected objects
Then the object "IfcWall/Wall_01.001" exists
And the object "IfcWall/Wall_02.001" exists
And the object "IfcElementAssembly/Assembly_01" exists
Then the object "IfcElementAssembly/Assembly" and "IfcElementAssembly/Assembly_01" belong to the same Linked Aggregate Group
# msgbus updates don't happen in background mode, so obj is not renamed to "IfcElementAssembly/Assembly_01"
And the object "Assembly_01" exists
Then the object "IfcElementAssembly/Assembly" and "Assembly_01" belong to the same Linked Aggregate Group
Scenario: Refresh linked aggregate
Given I load the IFC test file "/test/files/linked-aggregates.ifc"