References for adding external svgs to the sheets

It works exactly the same as schedules - you add some .svg file, path to it stored in ifc and you can attach it to the sheet.

UI - https://i.imgur.com/tGbCGBb.png

Still need to add some tests for references
This commit is contained in:
Andrej730
2023-06-01 21:41:06 +05:00
parent 3c9f09f246
commit 0fd94d291b
11 changed files with 275 additions and 60 deletions
+2 -4
View File
@@ -479,7 +479,7 @@ class TestImportSchedules(NewFile):
tool.Ifc.set(ifc)
ifc.createIfcDocumentInformation(Identification="Y", Name="FOOBAZ")
document = ifc.createIfcDocumentInformation(Identification="X", Name="FOOBAR", Scope="SCHEDULE")
subject.import_schedules()
subject.import_documents("SCHEDULE")
props = bpy.context.scene.DocProperties
assert props.schedules[0].ifc_definition_id == document.id()
assert props.schedules[0].identification == "X"
@@ -490,7 +490,7 @@ class TestImportSchedules(NewFile):
tool.Ifc.set(ifc)
ifc.createIfcDocumentInformation(DocumentId="Y", Name="FOOBAZ")
document = ifc.createIfcDocumentInformation(DocumentId="X", Name="FOOBAR", Scope="SCHEDULE")
subject.import_schedules()
subject.import_documents("SCHEDULE")
props = bpy.context.scene.DocProperties
assert props.schedules[0].ifc_definition_id == document.id()
assert props.schedules[0].identification == "X"
@@ -778,5 +778,3 @@ class TestDrawingStyles(NewFile):
self.setup_project_with_drawing()
bpy.ops.bim.reload_drawing_styles()
assert len(self.drawing_styles) == 3