(self)
| 83 | row.prop(self, "refresh_local", icon="FILE_REFRESH") |
| 84 | |
| 85 | def process(self): |
| 86 | path = flatten_data(self.inputs["path"].sv_get(), target_level=1)[0] |
| 87 | if not path: |
| 88 | return |
| 89 | path = abspath(path) |
| 90 | file = SvIfcStore.get_file() |
| 91 | _, ext = splitext(path) |
| 92 | if not ext: |
| 93 | raise Exception("Bad path. Provide a path to a file.") |
| 94 | if self.refresh_local and ext: |
| 95 | self.ensure_hirarchy(file) |
| 96 | file.write(path) |
| 97 | self.outputs["output"].sv_set(f"File written successfully to: {path}.") |
| 98 | |
| 99 | def ensure_hirarchy(self, file: ifcopenshell.file) -> None: |
| 100 | # TODO: same code as ifc.write_file_panel? |
no test coverage detected