Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

TIP: Toolbar Button Separator 1

Status
Not open for further replies.

takedownca

Mechanical
Mar 2, 2007
145
Here's a tip for all those annoyed at SW's inability to add or delete separator lines in toolbars. It's a bit involved, but not beyond anyone that likes to get into the nuts and bolts of things. To facilitate proper execution, I've added as much detail as possible to each step. I hope someone finds this helpful.
[ol]
[li]Record the name of the toolbar you want to modify.

[/li]
[li]Record the layout of the toolbar (e.g. 3 buttons, separator, 2 buttons, separator, 4 buttons). An example of shorthand for this would be 3/2/4 or xxx/xx/xxxx for those more visually inclined.

[/li]
[li]Write down the relative location of each separator you want to add or delete (e.g. insert after 2nd icon, delete after 3rd icon). When counting icon positions, include existing separators. Again, an example of shorthand would be xx|x<>xx/xxxx or 2i1d2/4 (2 buttons, insert separator, 1 button, delete separator, 2 more buttons, a separator, and 4 more buttons).

[/li]
[li]Close SW.

[/li]
[li]Start the Copy Settings Wizard.

[/li]
[li]Choose to backup only toolbar settings. This part isn't necessary, but since you'll be reimporting these settings later it's safer to only deal with the settings that will be modified.

[/li]
[li]Create a SLDREG settings file.

[/li]
[li]Open the settings file in a text editor (Notepad++ works well).

[/li]
[li]It's a lot of text (~5000 lines), but you'll be leaving most of the text alone. Find a line that reads [tt]HKEY_CURRENT_USER\...\User Interface\Toolbars[/tt].

[/li]
[li]Look for the names of the toolbars that you wrote down in Step 1. The names are pretty straight forward, and you won't have to look too hard since this section isn't too long (<100 lines).

[/li]
[li]Here's the fun part. Each line records the buttons for that particular toolbar using a quad hexadecimal scheme. Each button corresponds to 4 hex numbers of the form [tt]##,##,00,00,[/tt] (buttons seem to always end in [tt]00,00,[/tt]). A separator is indicated by [tt]ff,ff,ff,ff,[/tt]. All you have to do is move the instances of [tt]ff,ff,ff,ff,[/tt] to where you wanted the separators (see Step 2). Here's an example.

Below is the line for the Dimensions/Relations Toolbar. I know. "uiSkConstraintsToolBar_c" doesn't have "dimension" or "relation" in the name, but you can figure it out. A good (but not fool proof) way to verify you're looking at the right toolbar line is to count the number and placement of buttons ([tt]##,##,00,00,[/tt]) and separators ([tt]ff,ff,ff,ff,[/tt]). An easy way to do this is to use the Find function of your text editor and search for [tt]00,00,[/tt], which signals the end of a button code. Every time you push F3 (Find Next) you're skipping to the next button. The layout should match that of the toolbars you want to edit. In this case it has 10 buttons and no separators. The downside to this counting method is that you might identify the wrong toolbar if it has the same button/separator layout as your intended target toolbar.
"uiSkConstraintsToolBar_c"=hex: 5e,80,00,00,66,85,00,00,65,85,00,00,1f,93,00,00,a9,80,00,00,ab,80,00,00,dc,80,00,00,64,85,00,00,b1,80,00,00,9f,80,00,00,33,9f,00,00,
download.aspx


This is what the line should look like if I want to separate the buttons into groups of 4, 4, and 2. You'll see I've inserted [tt]ff,ff,ff,ff,[/tt] in 2 different places.
"uiSkConstraintsToolBar_c"=hex: 5e,80,00,00,66,85,00,00,65,85,00,00,1f,93,00,00,ff,ff,ff,ff,a9,80,00,00,ab,80,00,00,dc,80,00,00,64,85,00,00,ff,ff,ff,ff,b1,80,00,00,9f,80,00,00,33,9f,00,00,
download.aspx


[/li]
[li]Double-click the edited settings file to import it to the registry. Make sure to create a backup of your existing settings.

[/li]
[li]Restart SolidWorks and bask in the joy of your new separators. Of course this is assuming you haven't screwed something up. If something did go wrong, then import the backup settings and start over.
[/li]
[/ol]
 
You don't need to go through all that work. The separator bar is standard Windows functionality.

Just RMB on an icon while you are customizing your CM tab and Toolbars and you can add the separator to Begin a Group.

See attached.

Cheers,



Anna Wood
Anna Built Workstation, Core i7 EE965, FirePro V8700, 12 gigs of RAM, OCZ Vertex 120 Gig SSD
SW2009 SP3.0, Windows 7 RC1
 
Thanks Anna. You're right. If you use mainly use the Command Manager then this technique is moot. However, "Begin a Group" is only available in (and only affects) Command Manager toolbars. I personally don't like nor use the CM. I've opted for a Spartan setup that heavily utilizes the shortcut bar and keyboard shortcuts. Any changes you make to a CM toolbar don't carry over to corresponding standalone toolbar. More importantly, CM separators don't propagate to the flyout toolbars since flyouts are driven by the matching standalone toolbar.
 
Anna, that's what I thought too. Although I don't use the CM, I enabled it and could add a separator just fine, but I tried it on a few regular toolbars (Sketch, Surfaces, Sheet Metal, etc) without success. The RMB did not offer that option (and it wasn't hidden).

Can you confirm you can do it on your regular toolbars.
 
Hmm.... Interesting. You are right it doesn't work with regular toolbars.

I got the tip from Jim Wilkinson of SW. My impression was it worked for regular toolbars to.

Might need to bring this up to Jim over on the SolidWorks forums.

Thanks for the heads up. :)

Cheers,

Anna Wood
Anna Built Workstation, Core i7 EE965, FirePro V8700, 12 gigs of RAM, OCZ Vertex 120 Gig SSD
SW2009 SP3.0, Windows 7 RC1
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor