Custom Toolbar
Custom Toolbar
(OP)
Hello all,
I was wondering if there was a way of adding a new entirely empty toolbar? I suppose I could add one we don't use and empty it, but it would be nice to add a nice blank one with our own title. We're running 2009sp2.0 if it makes a difference.
Any Ideas?
Thanks
I was wondering if there was a way of adding a new entirely empty toolbar? I suppose I could add one we don't use and empty it, but it would be nice to add a nice blank one with our own title. We're running 2009sp2.0 if it makes a difference.
Any Ideas?
Thanks






RE: Custom Toolbar
As for the toolbars. You can create your own toolbar with your own title, icon etc using SolidWorks API (SldWorks::AddToolbar4 method or with the command manager APIs)
Artem Taturevich
CSWP
RE: Custom Toolbar
RE: Custom Toolbar
-handleman, CSWP (The new, easy test)
RE: Custom Toolbar
You are right with the Add-in. But it is easy to do (with the standard VS SW template). It is also possible to disable the addin's menus, PMP, command managers etc and keep just the toolbar.
BTW. It is possible to edit this toolbar as well as standard ones: you can add or remove buttons from it within the customization environment.
And these setting will persist from session to session (they stored in the registry).
Artem Taturevich
CSWP
RE: Custom Toolbar
So all you have to do to create a new toolbar is use the add-in to create the toolbar once, and it exists in SW forever, whether or not the add-in is active or not? And it behaves/customizes just like any other toolbar? If so, could you create a little add-in that does nothing but create a toolbar with whatever the user specifies in an InputBox or something?
-handleman, CSWP (The new, easy test)
RE: Custom Toolbar
Please find the sample addin in the attachment.
You should open the dll-file from the menu File->Open, set filter to "add-ins (*.dll)". Once you have loaded it you can select it from the tollbars list.
You can customize it and add standard button from another toolbar (please take a look at the attached picture).
BTW. I haven't mentioned about the toolbar visibility with add-in unloaded. It will be removed once the add-in unloads. But I believe it isn't a problem just set "Load on start-up" option to add-in automatically loads with the new session of SolidWorks.
Thanks,
Artem
Artem Taturevich
CSWP
RE: Custom Toolbar
Unfortunately, I can't seem to get it to work. I opened the .dll file in the File->Open dialog, but it did not seem to do anything. I didn't get any error messages or anything, but it doesn't appear in the Add-ins list under Tools->Add-Ins, and the custom toolbar doesn't appear in the list of toolbars.
-handleman, CSWP (The new, easy test)
RE: Custom Toolbar
The issue is probably a dependancy on one of the Visual Studio runtime dlls. If Artem can tell you which version of Visual Studio was used to compile the dll, you can download the corresponding redistributable from Microsoft.
Eric
RE: Custom Toolbar
handleman, please download the Visual Studio redistributable from Microsoft web site. (the add-in name is "SwCustToolbar")
Thanks,
Artem
Artem Taturevich
CSWP
RE: Custom Toolbar
As I know the redistributable from Microsoft was required on SolidWorks 2007 and earlier but in newer version it might be not obligatory but I'm not sure...
Artem Taturevich
CSWP
RE: Custom Toolbar
Matt Lorono
CAD Engineer/ECN Analyst
Silicon Valley, CA
Lorono's SolidWorks Resources
Co-moderator of Solidworks Yahoo! Group
and Mechnical.Engineering Yahoo! Group
RE: Custom Toolbar
Matt Lorono
CAD Engineer/ECN Analyst
Silicon Valley, CA
Lorono's SolidWorks Resources
Co-moderator of Solidworks Yahoo! Group
and Mechnical.Engineering Yahoo! Group
RE: Custom Toolbar
Yes, that is in c++.
I've written and tested this addin on two workstations with SolidWorks 2009. Probably some of the APIs I have used isn't presented in SolidWorks 2007.
Thanks,
Artem Taturevich
CSWP
RE: Custom Toolbar
I have recreated this sample addin in c# with the libraries from SolidWorks 2007 and created the installer.
Once the addin installed you can open it from the File->Open menu and choose "SwCSharpCustTB.dll" file from installation directory. The "SwCustTB" toolbar should appears under the toolbars menu.
Thanks
Artem Taturevich
CSWP
RE: Custom Toolbar
Here it is.
Artem Taturevich
CSWP
RE: Custom Toolbar
Thanks once again for your work on this. This time I was able to install the Add-In and the toolbar appears in my SW session each time I start SW. I am able to add/remove buttons from the new toolbar, but they do not persist from session to session. Every time I start SW only that first default button shows up. Is that the behavior you get on your test machines?
-handleman, CSWP (The new, easy test)
RE: Custom Toolbar
No I have different behavior. The customozation remains from session to session.
I have tried different combinations: adding buttons from Command menu, drag-n-drop buttons from another toolbar. Unloading addins from the menu, shutting down SolidWorks and reopening it. Every time I have my toolbar costumized.
I have tested it in SolidWorks 2009. Probably there is some another behaviour with another versions of SolidWorks.
Do you have your addin set to "Load on start up". Or you have reloadin it each session? And what version of SolidWorks do you use?
Thanks,
Artem Taturevich
CSWP
RE: Custom Toolbar
-handleman, CSWP (The new, easy test)
RE: Custom Toolbar
Next close/open SolidWorks. Does this button back to it original toolbar?
Thanks,
Artem
Artem Taturevich
CSWP
RE: Custom Toolbar
-handleman, CSWP (The new, easy test)
RE: Custom Toolbar
Could please you also try to unload/load addin within the current session? Has the button been removed from the toolbar as well?
Artem Taturevich
CSWP
RE: Custom Toolbar
It installed at: C:\Program Files\Default Company Name\SwCSharpCustTBInstall
Opened this: SwCSharpCustTB.dll
Right-clicked a button > customize and picked SwCustTB
After turning it on, just go to Commands in the Customize dialog box and drag and drop from there, no need to remove icons from existing toolbars unless you want to.
I'm using SW09 SP 3.0, and I can close SW and restart it and it remembered my buttons I dragged on there.
Flores
RE: Custom Toolbar
Matt Lorono
CAD Engineer/ECN Analyst
Silicon Valley, CA
Lorono's SolidWorks Resources
Co-moderator of Solidworks Yahoo! Group
and Mechnical.Engineering Yahoo! Group
RE: Custom Toolbar
I have way too many macro buttons to get rid of toolbars entirely. Certain macros don't run well from the "S" popup.
-handleman, CSWP (The new, easy test)
RE: Custom Toolbar
My reasoning behind wanting this was that a few of my collegues and I have put together some macros for automation and we would like to be able to install them in a company specific toolbar to all the users here.
I think I'm now leaning toward having just one button that brings up a second VB based dialog with all the available commands on that, but I'm quite happy I seem to have started something that looks useful to others
RE: Custom Toolbar
You may want to look into SWTools from AngelSix.com. Go to the "Products" page and click "Free Products".
-handleman, CSWP (The new, easy test)
RE: Custom Toolbar
RE: Custom Toolbar
http
Joe
SW Office 2008 SP5.0
P4 3.0Ghz 3GB
ATI FireGL X1
RE: Custom Toolbar
RE: Custom Toolbar
If this simple application can be useful for users I can take out the addin the generation of the name and the icon for toolbar. So everyone can set name and icon as he like.
If you need this please answer.
Artem Taturevich
CSWP
RE: Custom Toolbar