In response to this feature request;
https://cambamcnc.com/forum/index.php?topic=9584.msg74188#msg74188this plugin can be used to bulk rename MOP Names in the Tree view using a "Format String" enabling various parameters to be included in the name.
Install the plugin as usual.
It will appear in two places, Plugins->Formatted Rename
and the Right-Mouse-Click ContextMenu when on a selected MOP Names(s) in the Tree view.
THE KEY POINT IS, you can rename ALL the selected MOPs according to your "format" with one mouse-right-click and a left click.
PLEASE READ THE INSTRUCTIONS BELOW
Instructions.
This plugin appears in 2 places;
1. Plugins->Formatted Rename
2. Right-Mouse-Click ContextMenu when on a selected MOP Names(s) in the Tree view.
Using plugins->Formatted Rename, a Form will appear, see attached image.
This is used to set the format of a text string that will replace the existing MOP Name(s).
Once this has been set the Form can be closed and any text entered will be saved in Windows' Registry.
There is no need to revisit this Form unless you want to change the format.
To use this plugin in the future, all you need to do is select any MOPs to rename in the Tree view and Right-Mouse-Click, you can
select multiple MOPs to rename.
Choose from the context menu, "Formatted Rename" and all selected MOP names will be changed to the format previously set in the Form.
If these are not as required, Ctrl+Z Undo will revert back or you can reopen the Form and change the format if that was the problem.
Formatting the Text
-------------------------
The format string consists of a series of upper case characters separated by your choice of delimiter.
Obviously the delimiters have to be valid for use in the MOP Name and can also consist of lower case text.
On the Form is a "key" showing the upper case commands.
There is a text box for Custom Text if required.
Example1
T P,D Y
will yield something like, "5 End Mill,6 Profile"
Example2
If custom text is "Version 1" and the cb file is called "Widget One.cb"
F S-C T/D
will yield something like, "Widget One My Style1-Version 1 35/0.25"
Example3
S , Y , tool-T , diaD , A / G
will yield something like, "My Style 2 , Pocket , tool-20 , dia1.5 , Part1 / G-CODE"
Example4
If you have already renamed the MOP there is an "N" option to include the current name.
EDIT.
Version 2 attached
Added option "G", if this letter is included in the format string it will check to see if any code has been inserted in "Custom MOP Footer" or "Custom MOP Header"
If code was found then the word "G-CODE" will be added to the MOP Name as an indication that custom code was added to that MOP. (see Example 3 above)
This is in reply to this feature request by Bob,
https://cambamcnc.com/forum/index.php?topic=9103.msg71459#msg71459