Feature: Restart FreeCAD programmatically
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Feature: Restart FreeCAD programmatically
Is there a way to do this but within FreeCAD ?
Ref: https://github.com/FreeCAD/FreeCAD-addons/issues/98
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: Feature: Restart FreeCAD programmatically
I know this is a necro bump...but, I figure it is the same question so here I am.
I see that there was a commit for this.
How does one use this in a macro or Python script?
Is it possible to enter a line in the Python console to do it by hand?
I see that there was a commit for this.
How does one use this in a macro or Python script?
Is it possible to enter a line in the Python console to do it by hand?
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
Re: Feature: Restart FreeCAD programmatically
The Addon Manager does it- I am away from a computer right now, but check AddonManager.py and search for “restart” . Look for a function called after a one second timeout.
Re: Feature: Restart FreeCAD programmatically
Code: Select all
def restart_freecad():
"""Shuts down and restarts FreeCAD"""
args = QtWidgets.QApplication.arguments()[1:]
if FreeCADGui.getMainWindow().close():
QtCore.QProcess.startDetached(
QtWidgets.QApplication.applicationFilePath(), args
)
Re: Feature: Restart FreeCAD programmatically
Nice! Thanks wmayer!
We're getting another step closer to the original FR in https://forum.freecadweb.org/viewtopic. ... 69#p282469
We're getting another step closer to the original FR in https://forum.freecadweb.org/viewtopic. ... 69#p282469
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: Feature: Restart FreeCAD programmatically
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
My macros on Gist.github here complete macros Wiki and forum.
Re: Feature: Restart FreeCAD programmatically
Thanks @mario52!mario52 wrote: ↑Fri Sep 30, 2022 7:24 pm adding in wiki https://wiki.freecadweb.org/Code_snippe ... rt_FreeCAD
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs