why use freecadcmd when you want a GUI view?
in this case it is better to load the py file simply with file - open, and doing this, the file could be executed simply using the macro toolbar hitting the "green arrow" and having the gui to rotate and do all the things you want.
if you use freecadcmd you are telling FreeCAD to run in "command mode only" in other word the GUI is not used so there is no way to use a thing that you have purposely switched off when invoking FreeCAD in this way.
Regards
Carlo D.
Edit a spreadsheet value and save document
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: Edit a spreadsheet value and save document
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.
Blog: https://okkmkblog.wordpress.com/
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.
Blog: https://okkmkblog.wordpress.com/
Re: Edit a spreadsheet value and save document
Why waste time? You can just pass the script as an argument to freecad (GUI) command.
-
- Posts: 9
- Joined: Thu May 06, 2021 3:45 am
Re: Edit a spreadsheet value and save document
I will explain my use case more precisely: What I need, is to "run jobs" that should:
- open a document
- edit dimensions in them
- recompute
- save the file
- extract a PDF or image
and all of this has to be done on a server that will be called by a web application
This is why my first thought was to do it without gui, change the properties and then export
Do you think it can be done (whatever the way it uses)?
Re: Edit a spreadsheet value and save document
As I said just above, just pass your script as argument to the normal/Gui freecad command. It will execute the script in GUI environment then exit.
Re: Edit a spreadsheet value and save document
Thanks, this is a thing that I'm missing.
Do you know if it works with AppImage too?
Regards
Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.
Blog: https://okkmkblog.wordpress.com/
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.
Blog: https://okkmkblog.wordpress.com/
-
- Posts: 9
- Joined: Thu May 06, 2021 3:45 am
Re: Edit a spreadsheet value and save document
I will try this today but I think that it will be hard to run on a linux server for instance, since it will run the GUI and most server are not configure to have GUI, right?
Re: Edit a spreadsheet value and save document
Sure. But I'm not sure PDF export is available in console mode.qlerebours wrote: ↑Sat May 08, 2021 9:09 am I will try this today but I think that it will be hard to run on a linux server for instance, since it will run the GUI and most server are not configure to have GUI, right?