Autoload

A forum for research and development of the user interface of FreeCAD
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Autoload

Post by triplus »

Autoload.png
Autoload.png (50.48 KiB) Viewed 5558 times
Autoload module for FreeCAD.

Provides ability to load more workbenches on FreeCAD start. Such ability can be useful for workbench customization purposes and in combination with modules such as PieMenu, ShortCuts, CommandPanel ...

Code repository:

https://github.com/triplus/Autoload
User avatar
microelly2
Veteran
Posts: 4688
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Autoload

Post by microelly2 »

Good idea

can this startup loader be extended to do some more startup configuration?
I had the problem to add some pathes to my python environment
https://forum.freecadweb.org/viewtopic.php?f=22&t=21996
and it seems a good place to connect to these 3rd party modules too.
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: Autoload

Post by sgrogan »

This is indeed very interesting. One of my favourite FreeCAD features is the "lazy loading" But I have a startup macro that's cycles through a few workbenches so some commands/icons are immediately available at startup for global custom toolbars. Allowing the user to tune this behaviour seems convenient. I will definitely test this.
"fight the good fight"
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Autoload

Post by triplus »

I can investigate and try to add something like that. In a simple form.

P.S. Will first do some test and prototypes and lets see what will be the result.
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Autoload

Post by triplus »

Features added:
  • Autoload modules from macro folder
  • Import can occur on two FreeCAD start stages
  • Exception handling
Use case:

New.png
New.png (37.96 KiB) Viewed 5353 times

Use the following convention:
  • Prefix: Autoload_ (or Autoload_1_ to import module at latter FreeCAD start stage)
  • Name: Any (ASCII)
  • Suffix: .py
Enable.png
Enable.png (55.77 KiB) Viewed 5353 times

Restart FreeCAD.
chrisb
Veteran
Posts: 53920
Joined: Tue Mar 17, 2015 9:14 am

Re: Autoload

Post by chrisb »

In Path Workbench was recently introduced a special folder for the post processors. Perhaps the same technique could be used here. Advantages: keep the macro directory tidyer, no need to rename.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Autoload

Post by triplus »

chrisb wrote: Fri Jun 30, 2017 4:28 pm In Path Workbench was recently introduced a special folder for the post processors. Perhaps the same technique could be used here. Advantages: keep the macro directory tidyer, no need to rename.
No as this feature was added for regular users. And they shouldn't need to care about things like that. And i tried to make sure the whole procedure can be done from the GUI with only a few clicks. If you are developer you have all other options available at your disposal. ;)

P.S. Need to rename what?
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Autoload

Post by Kunda1 »

@triplus I submit a PR to tweek the README.md
https://github.com/triplus/Autoload/pull/2
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
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Autoload

Post by triplus »

Kunda1 wrote: Fri Jun 30, 2017 8:04 pm @triplus I submit a PR to tweek the README.md
https://github.com/triplus/Autoload/pull/2
I'll take a look tomorrow.

P.S. By taking a quick look image and a bit of fine tuning the description makes sense. As for the rest i am not sure for now. I would likely rather see a link to FreeCAD wiki to be added (describing the procedure in detail). Instead of providing such verbose (install) information for each module.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Autoload

Post by Kunda1 »

triplus wrote: Fri Jun 30, 2017 8:22 pm
Kunda1 wrote: Fri Jun 30, 2017 8:04 pm @triplus I submit a PR to tweek the README.md
https://github.com/triplus/Autoload/pull/2
I'll take a look tomorrow.

P.S. By taking a quick look image and a bit of fine tuning the description makes sense. As for the rest i am not sure for now. I would likely rather see a link to FreeCAD wiki to be added (describing the procedure in detail). Instead of providing such verbose (install) information for each module.
Good point. It goes without saying that the motive behind it has several reasons
Uniformity between all FC addons,
Options for folks who'd rather not use the addon manager who have or don't have git.
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
Post Reply