Addons... button to macros dialog?
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Be nice to others! Read the FreeCAD code of conduct!
-
- Veteran
- Posts: 5513
- Joined: Thu Apr 05, 2018 1:53 am
Addons... button to macros dialog?
I thought it would be convenient to have a button linking to the addons manager from within the macros dialog.
I think this button would generate more interest in the addon manager and provide a little more exposure to the workbenches and macros included within, particularly with new users who might not be already aware of the addon manager. But even experienced users might find the link to be more convenient than closing the dialog, and then going to the tools menu. No change is made to the tools menu. This is an additional link to the same tool.
Known issue: When changing languages the other button labels (e.g. create, rename, edit, delete) all get translated to the new language, but not the Addons... button. Not sure why. Maybe the translation files will get automatically updated once (if) this gets added?
I haven't submitted the pull request yet. I wanted to get some feedback first. What say ye? Bad idea? Good idea?
I think this button would generate more interest in the addon manager and provide a little more exposure to the workbenches and macros included within, particularly with new users who might not be already aware of the addon manager. But even experienced users might find the link to be more convenient than closing the dialog, and then going to the tools menu. No change is made to the tools menu. This is an additional link to the same tool.
Known issue: When changing languages the other button labels (e.g. create, rename, edit, delete) all get translated to the new language, but not the Addons... button. Not sure why. Maybe the translation files will get automatically updated once (if) this gets added?
I haven't submitted the pull request yet. I wanted to get some feedback first. What say ye? Bad idea? Good idea?
Re: Addons... button to macros dialog?
IMHO,, good idea. It's not like there is a real-estate problem to put the button in that dialog and it makes sense the progression to learn about other macros that have been vetted by the community on FreeCAD-macros. So from me
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
-
- Veteran
- Posts: 5513
- Joined: Thu Apr 05, 2018 1:53 am
Re: Addons... button to macros dialog?
hi
good idea and i am also interested in a macro duplication button (for save with name00. name01.....)
mario
good idea and i am also interested in a macro duplication button (for save with name00. name01.....)
mario
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.
-
- Veteran
- Posts: 5513
- Joined: Thu Apr 05, 2018 1:53 am
Re: Addons... button to macros dialog?
Thanks for the feedback. Yes, I think this is also a good idea. It would not be too hard to do, I think. It would be a separate pull request. Better to keep to one thing at a time. I'm thinking of a "Duplicate" button that becomes active when a macro is selected in the list. Click the button to automatically make a new macro (copy) with the same name with a number appended to it. For example, "MyMacro.FCMacro" would be used to make a new file named "MyMacro001.FCMacro". This new file can then be renamed as desired. A check would be made to see if the name001 file already exists, then use 002, 003, etc.
Re: Addons... button to macros dialog?
hi
exactly helpfully " pour les bricoleurs "
and with LineEdit with name00xx and bottom for accept the new name or adding text (see image) or..... (as "create new macro")
mario
exactly helpfully " pour les bricoleurs "
and with LineEdit with name00xx and bottom for accept the new name or adding text (see image) or..... (as "create new macro")
mario
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.
-
- Veteran
- Posts: 5513
- Joined: Thu Apr 05, 2018 1:53 am
Re: Addons... button to macros dialog?
I have something nearly ready.
It uses 3 digits, beginning with 001 up to 999.
"MyMacro.FCMacro" becomes "MyMacro001.FCMacro"
"MyMacro002.FCMacro" becomes "MyMacro003.FCMacro" unless there is no "MyMacro001.FCMacro" already existing, in which case "MyMacro002.FCMacro" becomes "MyMacro001.FCMacro". Should always increment from 001 or would be better to use existing digits and increment them? Example, should "MyMacro789.py" always become "MyMacro790.py"? Current way ensures always there are some available names (unless there are 999 backups already made).
Short filenames, like 1.FCMacro are handled as if the 1 is part of the basename, thus new file becomes: 1001.FCMacro. Same for anything less than 4 digits, e.g. 123.FCMacro -> 123001.FCMacro. But 1234.FCMacro -> 1001.FCMacro, if available or could go to 1235.FCMacro if all the other names are already taken: 1001.FCMacro, 1002.FCMacro ... 1233.FCMacro.
If we have case of 999 being used, the naming algorithm gives up (rather than risk infinite loop) and lets user pick new name.
User always has choice to accept suggested name for new file or enter something different. Always the name is tested to see if another file of the same name exists, and displays message and exits if so.
Re: Addons... button to macros dialog?
hi
maybe add neutral character @ ex:
mario
maybe add neutral character @ ex:
1@001.FCMacroShort filenames, like 1.FCMacro are handled as if the 1 is part of the basename, thus new file becomes: 1001.FCMacro.
123.FCMacro -> 123@001.FCMacroSame for anything less than 4 digits, e.g. 123.FCMacro -> 123001.FCMacro.
1234.FCMacro -> 1234@001.FCMacroBut 1234.FCMacro -> 1001.FCMacro,
mario
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.
-
- Veteran
- Posts: 5513
- Joined: Thu Apr 05, 2018 1:53 am
Re: Addons... button to macros dialog?
Good idea.mario52 wrote: ↑Sun Sep 02, 2018 11:31 am hi
maybe add neutral character @ ex:1@001.FCMacroShort filenames, like 1.FCMacro are handled as if the 1 is part of the basename, thus new file becomes: 1001.FCMacro.123.FCMacro -> 123@001.FCMacroSame for anything less than 4 digits, e.g. 123.FCMacro -> 123001.FCMacro.1234.FCMacro -> 1234@001.FCMacroBut 1234.FCMacro -> 1001.FCMacro,
mario
Edit: https://github.com/FreeCAD/FreeCAD/pull/1639
Re: Addons... button to macros dialog?
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.