Addons... button to macros dialog?

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
TheMarkster
Veteran
Posts: 5513
Joined: Thu Apr 05, 2018 1:53 am

Addons... button to macros dialog?

Post by TheMarkster »

I thought it would be convenient to have a button linking to the addons manager from within the macros dialog.

phpBB [video]


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?
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Addons... button to macros dialog?

Post by Kunda1 »

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 :thumbsup: 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
TheMarkster
Veteran
Posts: 5513
Joined: Thu Apr 05, 2018 1:53 am

Re: Addons... button to macros dialog?

Post by TheMarkster »

mario52
Veteran
Posts: 4698
Joined: Wed May 16, 2012 2:13 pm

Re: Addons... button to macros dialog?

Post by mario52 »

hi

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.
TheMarkster
Veteran
Posts: 5513
Joined: Thu Apr 05, 2018 1:53 am

Re: Addons... button to macros dialog?

Post by TheMarkster »

mario52 wrote: Sat Sep 01, 2018 8:58 am hi

good idea and i am also interested in a macro duplication button (for save with name00. name01.....)

mario
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.
mario52
Veteran
Posts: 4698
Joined: Wed May 16, 2012 2:13 pm

Re: Addons... button to macros dialog?

Post by mario52 »

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")

MacroDuplicate00.png
MacroDuplicate00.png (28.42 KiB) Viewed 2058 times
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.
TheMarkster
Veteran
Posts: 5513
Joined: Thu Apr 05, 2018 1:53 am

Re: Addons... button to macros dialog?

Post by TheMarkster »

mario52 wrote: Sat Sep 01, 2018 9:40 pm 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
I have something nearly ready.

phpBB [video]


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.
mario52
Veteran
Posts: 4698
Joined: Wed May 16, 2012 2:13 pm

Re: Addons... button to macros dialog?

Post by mario52 »

hi

maybe add neutral character @ ex:
Short filenames, like 1.FCMacro are handled as if the 1 is part of the basename, thus new file becomes: 1001.FCMacro.
1@001.FCMacro
Same for anything less than 4 digits, e.g. 123.FCMacro -> 123001.FCMacro.
123.FCMacro -> 123@001.FCMacro
But 1234.FCMacro -> 1001.FCMacro,
1234.FCMacro -> 1234@001.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.
TheMarkster
Veteran
Posts: 5513
Joined: Thu Apr 05, 2018 1:53 am

Re: Addons... button to macros dialog?

Post by TheMarkster »

mario52 wrote: Sun Sep 02, 2018 11:31 am hi

maybe add neutral character @ ex:
Short filenames, like 1.FCMacro are handled as if the 1 is part of the basename, thus new file becomes: 1001.FCMacro.
1@001.FCMacro
Same for anything less than 4 digits, e.g. 123.FCMacro -> 123001.FCMacro.
123.FCMacro -> 123@001.FCMacro
But 1234.FCMacro -> 1001.FCMacro,
1234.FCMacro -> 1234@001.FCMacro

mario
Good idea.

phpBB [video]


Edit: https://github.com/FreeCAD/FreeCAD/pull/1639
mario52
Veteran
Posts: 4698
Joined: Wed May 16, 2012 2:13 pm

Re: Addons... button to macros dialog?

Post by mario52 »

hi
TheMarkster wrote: Sun Sep 02, 2018 5:51 pm
phpBB [video]

very good work thanks

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.
Post Reply