Yes: once we have stopped hardcoding the path to user macros, I definitely imagine there being several ways to set which directories to look in.
Folder Structure for Macros?
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: Folder Structure for Macros?
Re: Folder Structure for Macros?
the code is at here:
https://github.com/FreeCAD/FreeCAD/blob ... mp.cpp#L78
What it does is:
1. retrieve the macro path from parameter or use the user data as default
2. Fill the List box
The list is not needed. Better change to just browse to select a file. Then do whatever one want.
https://github.com/FreeCAD/FreeCAD/blob ... mp.cpp#L78
What it does is:
1. retrieve the macro path from parameter or use the user data as default
2. Fill the List box
The list is not needed. Better change to just browse to select a file. Then do whatever one want.
- bavariaSHAPE
- Posts: 406
- Joined: Tue Jun 10, 2014 8:31 am
- Contact:
Re: Folder Structure for Macros?
What @chrisb writes would be a real simplification for macro management. Running macros from any folder without having to remember the path of the previous folder would be a relief for everyone. The current path specification (e.g. ...AppData/Roaming on Windows) is hard to follow for many users.
… for a happy FreeCAD-World … JM2C …
Re: Folder Structure for Macros?
Agreed. After reading this post, I started working on packaging for a macro I'm developing. I chose to use a subfolder under .../Macro to hold class files, icon files, and thread standard lookup tables, keeping the FCMacro files in /Macro. This worked great except for one hard stop... I can't load the class file from subfolder into Macro Editor to work on it.bavariaSHAPE wrote: ↑Tue May 24, 2022 9:51 am What @chrisb writes would be a real simplification for macro management.
May whatever Higher Power you believe in bless the Ukrainians. They are a decent people who never hurt anybody.
-
- Veteran
- Posts: 3179
- Joined: Thu Sep 24, 2020 10:31 pm
- Location: Hawaii
- Contact:
Re: Folder Structure for Macros?
Another minor annoyance:
The Macro directory finds its way onto the directory history for Save and Save As so I end up accidentally writing FCStd files to the Macro Directory.
The Macro directory finds its way onto the directory history for Save and Save As so I end up accidentally writing FCStd files to the Macro Directory.
-
- Veteran
- Posts: 5513
- Joined: Thu Apr 05, 2018 1:53 am
Re: Folder Structure for Macros?
You should be able to open from the File -> Open menu.KurtF wrote: ↑Thu May 26, 2022 4:24 pmAgreed. After reading this post, I started working on packaging for a macro I'm developing. I chose to use a subfolder under .../Macro to hold class files, icon files, and thread standard lookup tables, keeping the FCMacro files in /Macro. This worked great except for one hard stop... I can't load the class file from subfolder into Macro Editor to work on it.bavariaSHAPE wrote: ↑Tue May 24, 2022 9:51 am What @chrisb writes would be a real simplification for macro management.