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?
probably it will suffice that macro folder could be made viewed as a "tree", i.e I will specify a macro folder and then if there are subdfolders in this folder macro are searched also in subfolders.
In Linux and other OS subfolders could be "symlinks" so the real locations could be across an entire disk or even on a network (if the OS could link net mounted dir and make them appear as sub folders).
For WB it isi working, as on Linux I have a multiple places and some symlinks in "/Mod/" and they are working across different FC versions at least 0.19.3 and 0.20 dev (miniconda install).
Regards
Carlo D.
In Linux and other OS subfolders could be "symlinks" so the real locations could be across an entire disk or even on a network (if the OS could link net mounted dir and make them appear as sub folders).
For WB it isi working, as on Linux I have a multiple places and some symlinks in "/Mod/" and they are working across different FC versions at least 0.19.3 and 0.20 dev (miniconda install).
Regards
Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.
Blog: https://okkmkblog.wordpress.com/
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.
Blog: https://okkmkblog.wordpress.com/
Re: Folder Structure for Macros?
if i understand it correctly then I don't like it very much, because it would mean that the macros vanish as soon as I replace my current version or a new version added in parallel would not have the macros.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
-
- Veteran
- Posts: 3112
- Joined: Thu Sep 24, 2020 10:31 pm
- Location: Hawaii
- Contact:
Re: Folder Structure for Macros?
I'd just like to be able to drill down into subdirectories in the current Macro directories.
Re: Folder Structure for Macros?
I just use Gui::FileDialog::getOpenFileName to find a py file and run it. Throw out Macro.
Re: Folder Structure for Macros?
I don’t follow — why would a macro vanish? What I am describing isn’t all that different a storage strategy from what we currently have, except macros don’t have to be copied out of their mod directory to be run, and we don’t run the risk of name collisions during that copy. You will still have your normal user macro directory, plus possibly any number of other directories you want to have.
Re: Folder Structure for Macros?
You will be able to: the key change I am proposing is to stop hardcoding a single location for macros, and instead allow any arbitrary directories to be visible in the macro manager.edwilliams16 wrote: ↑Sat May 14, 2022 12:42 am I'd just like to be able to drill down into subdirectories in the current Macro directories.
Re: Folder Structure for Macros?
Good also if when I specify a directory in the list even his subdir where searched for Macro.
To avoid possible conflicts a full path name could be used, or the name and a tooltip showing "full path".
It won't be difficult to implement as from what I remember about QListWidget it is possible to set some properties for items.
Regards
Carlo D.
To avoid possible conflicts a full path name could be used, or the name and a tooltip showing "full path".
It won't be difficult to implement as from what I remember about QListWidget it is possible to set some properties for items.
Regards
Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.
Blog: https://okkmkblog.wordpress.com/
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.
Blog: https://okkmkblog.wordpress.com/
Re: Folder Structure for Macros?
I'm afraid I misunderstand something:
In the installation package there is among others the Mod directory. If macros are stored below that directory they will be lost if I change the installation and remove the old one.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: Folder Structure for Macros?
Oh, I see, sorry to not be clear: I mean the directory where the add on manager installs user mods. Really, I mean the individual subdirectories where those Addons are installed. Not in the Mod directory that is part of the core installation.
Re: Folder Structure for Macros?
Aah; sorry for not having seen this. That's something different.
Thinking about my projects I had several times certain macros for that very project. During the development it would be nice if I could just add the path to the project directory, which is usually outside the Mod directory.
If there would be a parameter controlling in/exclusion of subdirectories would be of further help.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.