mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 09:48:32 +00:00
test_copy_work_schedule - cover ifc2x3 support
This commit is contained in:
@@ -71,10 +71,11 @@ def add_work_plan(
|
||||
work_plan.Creators = [user.ThePerson]
|
||||
work_plan.StartTime = ifcopenshell.api.sequence.add_date_time(file, datetime.now())
|
||||
|
||||
context = file.by_type("IfcContext")[0]
|
||||
ifcopenshell.api.project.assign_declaration(
|
||||
file,
|
||||
definitions=[work_plan],
|
||||
relating_context=context,
|
||||
)
|
||||
if file.schema != "IFC2X3":
|
||||
context = file.by_type("IfcContext")[0]
|
||||
ifcopenshell.api.project.assign_declaration(
|
||||
file,
|
||||
definitions=[work_plan],
|
||||
relating_context=context,
|
||||
)
|
||||
return work_plan
|
||||
|
||||
Reference in New Issue
Block a user