(self, context)
| 267 | return |
| 268 | |
| 269 | def execute(self, context): |
| 270 | self.file = SvIfcStore.file |
| 271 | if not self.file: |
| 272 | raise Exception("No IFC file in SvIfcStore.") |
| 273 | _, ext = splitext(self.filepath) |
| 274 | # FIXME checking for extension not necessary |
| 275 | if not ext: |
| 276 | raise Exception("Bad path. Provide a path to a file ending with a file extension.") |
| 277 | else: |
| 278 | self.ensure_hirarchy(self.file) |
| 279 | self.file.write(self.filepath) |
| 280 | self.report({"INFO"}, f"File written to: {self.filepath}") |
| 281 | return {"FINISHED"} |
| 282 | |
| 283 | |
| 284 | class IFC_PT_write_file_panel(bpy.types.Panel): |
nothing calls this directly
no test coverage detected