Recent macros menu

Info about new community or project announcements, implemented features, classes, modules or APIs. Might get technical!
PLEASE DO NOT POST HELP REQUESTS OR OTHER DISCUSSIONS HERE!
Post Reply
TheMarkster
Posts: 2048
Joined: Thu Apr 05, 2018 1:53 am

Recent macros menu

Post by TheMarkster » Fri Sep 11, 2020 8:29 pm

There is now a recent macros menu group in the Macro menu. It functions similarly to Recent files in the File menu except for macros. A macro gets added to the recent list when it gets created, executed, or opened for editing from within the Macros execute dialog. A shortcut is created for the macros in the form of Ctrl+Shift+1 for the most recently used macro, Ctrl+Shift+2 for the 2nd most recently used macro, etc., up to 9. The default I believe is for 12 macros to be listed and for the 3 most recently used to get the keyboard shortcuts using Ctrl+Shift+ as the modifiers, but it has been a while since I worked on this. This is all configurable in Edit -> Preferences -> General -> Macro tab.

Today I updated the wiki to document this feature. https://wiki.freecadweb.org/Preferences_Editor

Note: if you want to open the macro in the editor rather than execute the macro press the Shift key while clicking the macro in the recent macros menu.
My FreeCAD video series on youtube: https://www.youtube.com/c/mwganson
chrisb
Posts: 28938
Joined: Tue Mar 17, 2015 9:14 am

Re: Recent macros menu

Post by chrisb » Fri Sep 11, 2020 10:36 pm

I've been waiting for this since it was announced. Good to see it in master now.
A Sketcher Lecture with in-depth information is available in English, auf deutsch, en français, en español.
User avatar
Kunda1
Posts: 8710
Joined: Thu Jan 05, 2017 9:03 pm

Re: Recent macros menu

Post by Kunda1 » Sat Sep 12, 2020 2:09 am

It's weird though, in the wiki it the screenshot uploaded to show the Recent Macros preferences, is dated from March 15 2020
So was this feature already in Master since March ?

Edit: nevertheless, this feature is awesome! It has key combos as well! Right on!
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
TheMarkster
Posts: 2048
Joined: Thu Apr 05, 2018 1:53 am

Re: Recent macros menu

Post by TheMarkster » Sat Sep 12, 2020 5:15 pm

The wiki image in March didn't include the macros menu preferences. I only uploaded that file yesterday, which another user updated again later to reduce it's size a little bit. The feature was added to master in the last few days.
My FreeCAD video series on youtube: https://www.youtube.com/c/mwganson
mario52
Posts: 3222
Joined: Wed May 16, 2012 2:13 pm

Re: Recent macros menu

Post by mario52 » Wed Sep 30, 2020 11:06 am

hi

thanks for this adding,

is it possible to have the same function but for edit the macro (new button in the "Execute macro" window)

or sort by date ...

thanks

mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting, Dialog creation. My macros on Gist.github.
TheMarkster
Posts: 2048
Joined: Thu Apr 05, 2018 1:53 am

Re: Recent macros menu

Post by TheMarkster » Wed Sep 30, 2020 6:46 pm

mario52 wrote:
Wed Sep 30, 2020 11:06 am
hi

thanks for this adding,

is it possible to have the same function but for edit the macro (new button in the "Execute macro" window)

or sort by date ...

thanks

mario
I do not understand. There is already Edit button in Execute Macro dialog. To edit the macro from recent macros (instead of execute) hold Shift key while clicking.
My FreeCAD video series on youtube: https://www.youtube.com/c/mwganson
mario52
Posts: 3222
Joined: Wed May 16, 2012 2:13 pm

Re: Recent macros menu

Post by mario52 » Thu Oct 01, 2020 8:23 am

hi
TheMarkster wrote:
Wed Sep 30, 2020 6:46 pm
hold Shift key while clicking.
many thanks (sorry for the noise)

mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting, Dialog creation. My macros on Gist.github.
freedman
Posts: 1684
Joined: Thu Mar 22, 2018 3:02 am
Location: Washington State, USA

Re: Recent macros menu

Post by freedman » Thu Oct 01, 2020 10:56 pm

Another thought; If there is only one macro file open then make the Green macro start arrow active, so while you are working on a model you can start the macro without changing screen focus.
freedman
Posts: 1684
Joined: Thu Mar 22, 2018 3:02 am
Location: Washington State, USA

Re: Recent macros menu

Post by freedman » Fri Oct 02, 2020 3:55 pm

Wow! this is great, works as described. Already using it and saving time.
Thank you
mendy
Posts: 85
Joined: Mon May 21, 2018 2:16 pm

Re: Recent macros menu

Post by mendy » Sat Oct 03, 2020 4:28 pm

Hello noticed this post and tried it in a file and the recent macros was showing three that I removed. If I click on a removed one it correctly says File not found and the macro is removed from the list. Deleted all this way and list is empty. (was wondering why a macro I was using wasn't in list but figured out it was because I was launching from created toolbar button, made sense to me). Saved file and on relaunch the recent macros show the 3 macros again. Found in parameter editor removing the three mru's solved that problem. Was trying manually installed macros so I installed one from addon manager and executed it and it showed up in list. Uninstalled with addon manager and it still shows up. Did try edit preferences and set size of recent macro list to 0, apply and restart. List is now clear but if edit preferences and set it back to say 3, apply save and restart they show up as they are still in the parameter editor list. Probably not explaining properly and just noticed because I was trying various macros and removing them versus someone using a stable list. Nice feature does work well did not check if say with a setting of three if new macro use would move them off the list.
Attachments
recmacro.jpg
recmacro.jpg (44.18 KiB) Viewed 548 times
fnfound.jpg
fnfound.jpg (6.3 KiB) Viewed 548 times
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest