This blog post is the first in a series of technical tips about the SolidWorks User Interface. Call the series "Everything you wanted to know about -----, but were afraid to ask". The first few posts will be about the various types of toolbars available in the system. This started as one comprehensive post about toolbars, but turned out to be too long so I have split it up. The first post will be about "regular toolbars".

 

Regular Toolbars

SolidWorks has always strived to follow Microsoft standards and since SolidWorks 95 has supported "standard" Microsoft toolbars. I put standard in quotes because Microsoft has enhanced their toolbars over time, yet have not provided those enhancements in their standard toolbar toolkit. Our programmers have had to program such enhancements into the SolidWorks toolbars over the years so you won't see a one-to-one behavior of SolidWorks toolbars to Microsoft toolbars (the amount of functionality you get with Microsoft toolbars varies between different Microsoft application anyway; the Office suite having the most advanced toolbars up until they removed them in Office 2007). For the rest of these toolbar posts, I'll call these "regular toolbars" since standard can be used to mean many things and is also the actual name of one of the regular toolbars in SolidWorks. For clarity, the following is the Curves toolbar which is an examples of a regular toolbar:

 

      CurvesToolbarSmall.gif

 

Toolbar visibility: The visibility of each of the regular toolbars is stored four different times; one visibility state for each document type (part, assembly, and drawing) and one state for when no documents are open. We've seen reports on the user forum where a user will say that the visibility is being controlled differently for different documents of the same type (for instance, 2 part documents). I am not sure how this could be possible since this visibility information is stored in the registry, not inside the documents. Certainly if it is repeatable, it should be submitted through their technical support representative.

The visibility of toolbars is controlled in the following places:

    • Using the right mouse button shortcut menu on the SolidWorks application/toolbar border.
    • View, Toolbars on the top level menus.
    • Tools, Customize, Toolbars

 

Toolbar position:Regular toolbars can be docked along the top, bottom, left or right of the SolidWorks application frame or undocked. There are a couple of exceptions of toolbars that contain horizontal controls (like the layer and web toolbars) that can only be docked on the top or bottom. When undocked, the shape of the toolbar can be changed to some extent (the separators in the toolbars force grouping and sometimes limit how you can shape the toolbar). The position of regular toolbars is stored in the registry once for each toolbar. We sometimes get requests for "locking" the toolbars into a particular position because the toolbars move around. Theoretically, the behavior should be that they are "naturally" locked in place unless they MUST move due to something else happening. Events that can trigger the toolbars moving are: 1) The SolidWorks window is resized down so small that it must push the toolbars together (eliminating empty space). 2) another toolbar becomes visible that is trying to occupy the same space - this can happen if you are trying to layout toolbars between different document types and put the same toolbar in two different positions between document types - remember, one single toolbar can only be in one position across the different document types. In past releases, we received a lot of complaints about toolbars moving around, but we have been diligent about fixing problems where this occurs unexpectedly so it really should not happen outside of the cases mentioned above (and perhaps for older API/Add-in toolbars mentioned below). Toolbar chevrons, as detailed below, were introduced in SolidWorks 2004 and further enhanced in SolidWorks 2005 and eliminated the problem of toolbars "jumping" to other rows/columns when the SolidWorks window was resized.

 

Toolbar size: There are two different sizes of toolbar buttons; small (16x16s pixel per icon) and large (24x24 pixels per icon). You choose between the sizes in Tools, Customize, Toolbars. As an example, the Tools toolbar is shown in both small and large size below:

 

ToolbarSmall.gif

ToolbarLarge.gif

 

Toolbar chevrons:If the SolidWorks window is resized down to a size such that all the toolbars on a row can not physically fit, each toolbar starting from the right/bottom are truncated and the truncated buttons are accessed through a chevron at the end of the toolbar. Below is an example of the Tools toolbar shown with the chevron expanded:

 

ToolbarChevron.gif

 

Customizing toolbars:You can add/remove buttons from toolbars by going to Tools, Customize, Commands tab and dragging/dropping toolbar icons on/off the toolbars. You can also remove buttons or move them between toolbars by using Alt-drag on the buttons at any time (without being in the Tools, Customize command). You are not restricted to putting buttons on the toolbar on which they are defined in the customize dialog. Any button can go on any toolbar. You cannot at this time make your own, blank toolbar. Most users who want a new toolbar simply take a toolbar they are not using otherwise, remove the buttons from it, and add the buttons they desire onto it. You can also add toolbars through the API as mentioned below.

 

API/Add-in Toolbars

Third party programmers and users with programming skills can program their own toolbars through the API. There have been various methods for creating toolbars through the API over the years. We suggest using the very latest "ICommandManager Interface" APIs which use the same underlying architecture as the regular toolbars in SolidWorks and provides the same customization ability to the end user. A complaint that comes up on the user forum somewhat regularly is that a third party's toolbar cannot be customized or used in the SolidWorks CommandManager. Unfortunately, this is because the add-in is using older toolbar APIs and must be upgraded to the ICommandManager Interface to take advantage of customization and the CommandManager. Please ask the maker of the add-in to upgrade their implementation if you want to customize the toolbar or use the buttons from it in the CommandManager or on other toolbars.  The older API toolbars also exhibit positioning problems occasionally and we advise using the new toolbar APIs as the code and architecture for these is more up to date.

 

If users see anything I have missed about regular toolbars in this blog post, please comment and I will try to update the blog.

 

The next few topics in the series about toolbars will be:

Technical Tip: SolidWorks Menu Bar

Technical Tip: SolidWorks CommandManager

Technical Tip: SolidWorks Heads-Up View Toolbar

Technical Tip: Flyout Tool Buttons

Technical Tip: Shortcut Bars ("S" Key)

Technical Tip: SolidWorks Context Toolbars

 

Enjoy,

Wilkie

 

Copyright © 2009 Dassault Systèmes SolidWorks Corp. All rights reserved.
Do not distribute or reproduce without the written consent of Dassault Systèmes SolidWorks Corp.