Fix P6 WBS identification import

This commit is contained in:
Dion Moult
2021-05-05 10:16:25 +10:00
parent a05d017341
commit 018d754b2e
+4 -1
View File
@@ -302,11 +302,14 @@ class P62Ifc:
work_schedule=None if wbs["ParentObjectId"] else work_schedule,
parent_task=self.wbs[wbs["ParentObjectId"]]["ifc"] if wbs["ParentObjectId"] else None,
)
identification = wbs["Code"]
if wbs["ParentObjectId"]:
identification = self.wbs[wbs["ParentObjectId"]]["ifc"].Identification + "." + wbs["Code"]
ifcopenshell.api.run(
"sequence.edit_task",
self.file,
task=wbs["ifc"],
attributes={"Name": wbs["Name"], "Identification": wbs["Code"]},
attributes={"Name": wbs["Name"], "Identification": identification},
)
for activity_id in wbs["activities"]:
self.create_task_from_activity(self.activities[activity_id], wbs, None)