Hi,
I have a WB that in fact is simply adding a file type filter (as Idf WB is doing) and launching a macro when this type of file are going to be open...
Till now everything is fine...
What I would like to achieve is to automatically add a Macro Button to i.e. Global Toolbar ...
I noticed that @DeepSOIC Part-o-Magic WB is in fact doing what I would like to achieve... but PoM is also adding a WB in the WB combo box...
In my situation I wouldn't want the WB in the combo, but just the Command in the ToolBar....
Is that achievable?
Could someone gives me some tips?
Thx in advance
Maurice
Add a Global Toolbal from a Workbench
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
- DeepSOIC
- Veteran
- Posts: 7896
- Joined: Fri Aug 29, 2014 12:45 am
- Location: used to be Saint-Petersburg, Russia
Re: Add a Global Toolbal from a Workbench
You betcha it's achievable, part-o-magic is no magic
In InitGui, you should import a py file that will register your commands, and also modify some parameters to create the toolbar.
See this:
https://forum.freecadweb.org/viewtopic.php?t=21389
and PoM's GlobalToolbar.py:
https://github.com/DeepSOIC/Part-o-magi ... Toolbar.py
In InitGui, you should import a py file that will register your commands, and also modify some parameters to create the toolbar.
See this:
https://forum.freecadweb.org/viewtopic.php?t=21389
and PoM's GlobalToolbar.py:
https://github.com/DeepSOIC/Part-o-magi ... Toolbar.py
Re: Add a Global Toolbal from a Workbench
done and a new Global tool bar is created if missingDeepSOIC wrote:In InitGui, you should import a py file that will register your commands
I'm working/struggling on trying to add a single button to launch a macroDeepSOIC wrote:modify some parameters to create the toolbar.
I'm not familiar with WB creation and I don't know atm how to add a command...
a bit of magic at least!DeepSOIC wrote:You betcha it's achievable, part-o-magic is no magic
Thx
Maurice