Cool, that works finewmayer wrote: ↑Mon Mar 23, 2020 8:14 pmThis restarts the FreeCAD process with the same arguments it has been started before. If in your running FreeCAD instance you have manually created a new document you want to restore then you must extend the above code snippet. Save the document under a certain file path and add it to args.Code: Select all
import FreeCADGui from PySide import QtGui,QtCore args = QtGui.QApplication.arguments()[1:] if FreeCADGui.getMainWindow().close(): QtCore.QProcess.startDetached(QtGui.QApplication.applicationFilePath(),args)
Reload Workbenches for Development
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!