INNER CODE UNIT · Python
pick_project_file
wzyn20051216/solidworks-automation-skill · apps/desktop/cad_workbench/app.py:459
def pick_project_file(self) -> None:
start = self.output_root.text() or str(default_output_root())
file_path, _ = QFileDialog.getOpenFileName(self, "打开项目", start, "Project JSON (project.json)")
if file_path:
self.load_project(Path(file_path).parent)
def append_log(self, message: str) -> None:
self.log_box.append(message)
self.log_box.verticalScrollBar().setValue(self.log_box.verticalScrollBar().maximum())
QApplication.processEvents()
def _set_table_row(self, table: QTableWidget, values: list[Any]) -> None:
row = table.rowCount()
table.insertRow(row)
for column, value in enumerate(values):
table.setItem(row, column, QTableWidgetItem(str(value)))
def add_default_row(self, table: QTableWidget, kind: str) -> None: