that is not true, the export GUI command launches a file dialog to chose the name and location of the exported file, but in script you can directly specify the filename as an argument. The same can happen with export settings, the GUI command can launch a dialog asking for the settings but the equivalent macro would just specify those as an argument for the function or skip those arguments to use default values.easyw-fc wrote: ↑Mon Oct 03, 2022 7:59 pm Come on,
you say: "You click Export" but the code is running automatically by a script, there is no user intervention apart a continuous integration.
Forcing the dialog to prompt at each call to export a STEP file, will require a human action, breaking the building.
FreeCad forces me to save a file when a .step file is loaded.
Forum rules
and Helpful information
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help
Also, be nice to others! Read the FreeCAD code of conduct!
Also, be nice to others! Read the FreeCAD code of conduct!
- adrianinsaval
- Veteran
- Posts: 5541
- Joined: Thu Apr 05, 2018 5:15 pm
Re: FreeCad forces me to save a file when a .step file is loaded.
Re: FreeCad forces me to save a file when a .step file is loaded.
I know it very well, because I use this in my code, but the issue is visible when you import a file with DXF import...adrianinsaval wrote: ↑Tue Oct 04, 2022 11:31 am that is not true, the export GUI command launches a file dialog to chose the name and location of the exported file, but in script you can directly specify the filename as an argument. The same can happen with export settings, the GUI command can launch a dialog asking for the settings but the equivalent macro would just specify those as an argument for the function or skip those arguments to use default values.
try this code when you have the 'Show this dialog when importing and exporting' checkbox checked
Code: Select all
import importDXF
importDXF.open(u"c:/myfile.dxf")
that would be the similar behavior and issue if the code will add this show dialog option
- adrianinsaval
- Veteran
- Posts: 5541
- Joined: Thu Apr 05, 2018 5:15 pm
Re: FreeCad forces me to save a file when a .step file is loaded.
It does not have to be, IMO that's a bad implementation in DXF import, it should at the very least have a flag in the python command to launch or not the dialog. I would even consider it a bug since it's breaking scripting depending on user settings.
Re: FreeCad forces me to save a file when a .step file is loaded.
ok, this is an option (at least an optional flag, avoiding to break previous implementations)... but we are discussing about a really needed feature? what pro? and coming from a user which suggests that reading the manual is a bad habit?adrianinsaval wrote: ↑Tue Oct 04, 2022 11:57 am It does not have to be, IMO that's a bad implementation in DXF import, it should at the very least have a flag in the python command to launch or not the dialog. I would even consider it a bug since it's breaking scripting depending on user settings.
just to remember:
I would say like jriegel motto:
Stop whining - start coding!
if the guy is thinking seriously to modify something he should stop whining and prepare a PR, after a discussion...
You can see his attitude also on many other threads...
Just my 2 cents.
Re: FreeCad forces me to save a file when a .step file is loaded.
This function is part of the core system and depending on what the selected file type is the export() function of the module is called that supports the file type. Currently, at this point it's not possible to show another dialog with settings because that dialog must be part of the module and the core system doesn't know about this dialog.that is not true, the export GUI command launches a file dialog to chose the name and location of the exported file
A possibility to make this working would be that a module implements a function exportSettings() and the returned value will be passed to export() as an additional argument.
The other way how it's e.g. done with the DXF import/export is to show that dialog within the export() function but this is an ugly way because the author of a script must be aware of this behaviour and (tmp.) switch off the dialog.
Re: FreeCad forces me to save a file when a .step file is loaded.
It looks like you don't want to discuss and learn, I don't even know why I am putting energy into this. That is fine, I cannot teach people how to be a better version of themselves. They have to want and do this by themselves.
Re: FreeCad forces me to save a file when a .step file is loaded.
git commit 4d719d516e adds support to provide export options.
Every module is now free to support export options. If a module supports it then it must extend its export() function to handle three arguments. The third argument is optional.
git commit 5af6521377 implements the exportOptions() function for the ImportGui module.
git commit 5ee0f0a8cf implements a dialog for STEP export.
Every module is now free to support export options. If a module supports it then it must extend its export() function to handle three arguments. The third argument is optional.
git commit 5af6521377 implements the exportOptions() function for the ImportGui module.
git commit 5ee0f0a8cf implements a dialog for STEP export.
Re: FreeCad forces me to save a file when a .step file is loaded.
Here comes the guru:
with his real face:
leoheck wrote: ↑Tue Aug 30, 2022 12:14 am Sorry, where can I go to talk with real human beings?
It looks like this forum is just full of trolls.
Maybe I have to go back to Reddit or Facebook, or even Instagram. They talk more on Instagram these days than on this forum.
It looks like there is no one that can handle a conversation like a real human being in this stupid forum. Serioslly. WTF!
- adrianinsaval
- Veteran
- Posts: 5541
- Joined: Thu Apr 05, 2018 5:15 pm
Re: FreeCad forces me to save a file when a .step file is loaded.
leoheck ans easyw-fc please both de-escalate and try to be more polite in the future, and when discussing a feature request I would appreciate if the focus was on the merit of the idea and of the objections rather than of the person behind or against it.
Re: FreeCad forces me to save a file when a .step file is loaded.
I replied in a polite way ... I was moderating a user that already did a mess at the forum ...adrianinsaval wrote: ↑Wed Oct 05, 2022 12:29 pm leoheck ans easyw-fc please both de-escalate and try to be more polite in the future, and when discussing a feature request I would appreciate if the focus was on the merit of the idea and of the objections rather than of the person behind or against it.
Just to remember you, in case you missed (and I think you did because of the way you stand in your post):
and about the merit of the idea it depends also on the way the idea is exposed...