Tools>Customize> then choose the toolbars tab, then in the workbench selector on the right choose Global. Then create your toolbar and it will show up in all workbenches.godblessfq wrote:How do I make a custom toolbar for all workbenches without define the same content repetively?
Plugin Loader
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Be nice to others! Read the FreeCAD code of conduct!
Re: Plugin Loader
"fight the good fight"
- microelly2
- Veteran
- Posts: 4688
- Joined: Tue Nov 12, 2013 4:06 pm
- Contact:
Re: Plugin Loader
See my example filegodblessfq wrote:How do I make a custom toolbar for all workbenches without define the same content repetively?
https://github.com/microelly2/freecad-p ... onfig.yaml
you can reuse entrys in yaml by the anchor pointer construct
Define an anchor &ABC
myEntry: &ABC
yourData: ...
Reuse it with *ABC
myEntryElseWhere: *ABC
In the example Files the *FEM, *pcb point to entries in the pluginloaderconfig.yaml
https://github.com/microelly2/freecad-p ... onfig.yaml
maybe interesting for you
https://www.youtube.com/watch?v=VIc4yU2vrSA
https://www.youtube.com/watch?v=sDgoF9ddBLg
https://www.youtube.com/watch?v=88bKd3NRtfQ
-
- Posts: 110
- Joined: Fri Jul 17, 2015 7:40 pm
Re: Plugin Loader
I would make another feature request. The tabs in plugin loader (cad, cam etc.) maybe better be placed horizontally, since it scrolls with the list, the user lost the position in the tab while scroll the list and you need to reach the bottom to access previous tab and next tab arrows. Just my opinion.
Thank you for your great work! I wish someday I can be as good as you guys.
Thank you for your great work! I wish someday I can be as good as you guys.
-
- Posts: 110
- Joined: Fri Jul 17, 2015 7:40 pm
Re: Plugin Loader
How could I didn't see it! I have played with the xml file for a whole night. Thank you!sgrogan wrote: Tools>Customize> then choose the toolbars tab, then in the workbench selector on the right choose Global. Then create your toolbar and it will show up in all workbenches.
- microelly2
- Veteran
- Posts: 4688
- Joined: Tue Nov 12, 2013 4:06 pm
- Contact:
Re: Plugin Loader
The best feeling is without scrolling, so the entry lists should be shorter for all tabs.
It's still a nice to have project too.
horizontal layout was in the first version - but another opportunity is to make it configurable (I will rethink it )
It's still a nice to have project too.
horizontal layout was in the first version - but another opportunity is to make it configurable (I will rethink it )
Re: Plugin Loader
Great work microelly2
With some guidance integrating FreeCAD in Arch, I have finally managed to properly install and run your plugin.
I have come across one issue in both Arch and Mint 17.2:
Installing Parts Library, both plugin and library installs fine. However when trying to activate the plugin I get problems.
When starting the Part Lib from Plugin Manager the plugin seams to start fine
But when browsing the Library with single click i get
'import zipfile, tempfile' from python console. corrects this problem and subsequent browsing works perfectly.
If i try to start the Parts Lib module by running.
directly in Python console the module works perfectly.
I also tried to past same code in Macro and that seams to work perfectly also.
I can not for the life of me figure out what is causing this, for a log time I have been under the impression that this problem was caused by the non FreeCAD folder structure in a Arch installation, but as I get the same results in Mint it points to some other issue.
Can anybody else confirm this problem or shed some light on what could be causing it?
With some guidance integrating FreeCAD in Arch, I have finally managed to properly install and run your plugin.
I have come across one issue in both Arch and Mint 17.2:
Installing Parts Library, both plugin and library installs fine. However when trying to activate the plugin I get problems.
When starting the Part Lib from Plugin Manager the plugin seams to start fine
Code: Select all
!fn="/usr/share/freecad/Mod/plugins/FreeCAD-library/PartsLibrary.FCMacro";exec open(fn).read()!
/usr/share/freecad/Mod/plugins/FreeCAD-library
Code: Select all
Traceback (most recent call last):
File "<string>", line 118, in clicked
NameError: global name 'zipfile' is not defined
If i try to start the Parts Lib module by running.
Code: Select all
fn="/usr/share/freecad/Mod/plugins/FreeCAD-library/PartsLibrary.FCMacro";exec open(fn).read()
I also tried to past same code in Macro and that seams to work perfectly also.
I can not for the life of me figure out what is causing this, for a log time I have been under the impression that this problem was caused by the non FreeCAD folder structure in a Arch installation, but as I get the same results in Mint it points to some other issue.
Can anybody else confirm this problem or shed some light on what could be causing it?
Need help? Feel free to ask, but please read the guidelines first
- microelly2
- Veteran
- Posts: 4688
- Joined: Tue Nov 12, 2013 4:06 pm
- Contact:
Re: Plugin Loader
Hello cox,
It seems that during the execution from inside the pluginmanager the path to zipfile is lost
The location of the zipfile module you can get this way
>>> import zipfile
>>> zipfile
<module 'zipfile' from '/usr/lib/python2.7/zipfile.pyc'>
>>>
Next step can be to add this path before the exec call
exec( 'import sys;sys.append("path-to-zipfile-on-arch-linux");\n' + open(fn).read() )
can you please check whether this works for you. then I can implement an automatic soluten ..
It seems that during the execution from inside the pluginmanager the path to zipfile is lost
The location of the zipfile module you can get this way
>>> import zipfile
>>> zipfile
<module 'zipfile' from '/usr/lib/python2.7/zipfile.pyc'>
>>>
Next step can be to add this path before the exec call
exec( 'import sys;sys.append("path-to-zipfile-on-arch-linux");\n' + open(fn).read() )
can you please check whether this works for you. then I can implement an automatic soluten ..
Re: Plugin Loader
I get the same results as you when running
In Arch:
In MInt:
In Arch:
Code: Select all
>>> zipfile
<module 'zipfile' from '/usr/lib/python2.7/zipfile.pyc'>
Code: Select all
>>> zipfile
<module 'zipfile' from '/usr/lib/python2.7/zipfile.pyc'>
I do not quite understand where you want me to insert this line?microelly2 wrote:Next step can be to add this path before the exec call
exec( 'import sys;sys.append("path-to-zipfile-on-arch-linux");\n' + open(fn).read() )
Need help? Feel free to ask, but please read the guidelines first
Re: Plugin Loader
Does this happen on your machine also, or is it just on my machines?microelly2 wrote: It seems that during the execution from inside the pluginmanager the path to zipfile is lost
Just to be clear: The only thing that is affected is the preview function of the parts. Adding parts to documents is OK
Need help? Feel free to ask, but please read the guidelines first
- microelly2
- Veteran
- Posts: 4688
- Joined: Tue Nov 12, 2013 4:06 pm
- Contact:
Re: Plugin Loader
May be I misunderstood you, I will test it.cox wrote: Just to be clear: The only thing that is affected is the preview function of the parts. Adding parts to documents is OK