Fix #3403. Templates must be specific to the version you are creating.

This commit is contained in:
Dion Moult
2023-07-08 19:30:11 +10:00
parent 8c1214e8c4
commit 8977d37ccd
@@ -31,6 +31,8 @@ class Project(blenderbim.core.tool.Project):
# TODO refactor
filepath = os.path.join(bpy.context.scene.BIMProperties.data_dir, "libraries", template)
bpy.ops.bim.select_library_file(filepath=filepath)
if IfcStore.library_file.schema != tool.Ifc.get().schema:
return
for element in IfcStore.library_file.by_type("IfcTypeProduct"):
bpy.ops.bim.append_library_element(definition=element.id())