MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / process

Method process

src/ifcsverchok/nodes/ifc/write_file.py:85–97  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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?

Callers 1

refresh_node_localMethod · 0.95

Calls 3

ensure_hirarchyMethod · 0.95
get_fileMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected