mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-17 14:02:27 +00:00
Fix P6 WBS identification import
This commit is contained in:
@@ -302,11 +302,14 @@ class P62Ifc:
|
|||||||
work_schedule=None if wbs["ParentObjectId"] else work_schedule,
|
work_schedule=None if wbs["ParentObjectId"] else work_schedule,
|
||||||
parent_task=self.wbs[wbs["ParentObjectId"]]["ifc"] if wbs["ParentObjectId"] else None,
|
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(
|
ifcopenshell.api.run(
|
||||||
"sequence.edit_task",
|
"sequence.edit_task",
|
||||||
self.file,
|
self.file,
|
||||||
task=wbs["ifc"],
|
task=wbs["ifc"],
|
||||||
attributes={"Name": wbs["Name"], "Identification": wbs["Code"]},
|
attributes={"Name": wbs["Name"], "Identification": identification},
|
||||||
)
|
)
|
||||||
for activity_id in wbs["activities"]:
|
for activity_id in wbs["activities"]:
|
||||||
self.create_task_from_activity(self.activities[activity_id], wbs, None)
|
self.create_task_from_activity(self.activities[activity_id], wbs, None)
|
||||||
|
|||||||
Reference in New Issue
Block a user