Orca3D News

Friday, December 17, 2010

Adding a new button on a toolbar

In a previous post we discussed a useful plug-in, ScaleByPlane (which has become a function in the Rhino 5 WIP). If you find yourself using this function frequently, you'll get tired of typing the command and may want to put it on a toolbar. Rhino makes it easy to create new buttons on a toolbar, and even whole new toolbars, so that you can customize the interface and work more efficiently.

One of the toolbars that Orca3D installs is called "Rhino Functions Icons," and it contains Rhino functions that we think are useful in marine design but are not found on the Rhino toolbars that are normally turned on. Let's look at how you would add a button to this toolbar for the ScaleByPlane function.

The first step is to undock the toolbar, and then right-click in the header portion of the toolbar and select "Add Button."
You'll see a new, blank button on the toolbar. Now, hold down Shift and right-click on the new button. This will bring up Rhino's Edit Toolbar Button dialog:

If you are artistically inclined, you can choose "Edit Bitmap" and draw a bitmap for the button. If you'd rather not, you can simply enter text. First, enter text in the Tooltip entry field, so that when you hover your mouse over the button you'll remember what it's for. Next, select "Show Text Only" (unless you're drawing a bitmap for the icon), and finally, enter the command for the Left mouse button. Click OK, and you'll see the new button. Now you can dock the toolbar again:

Note that you can edit any toolbar button this way, not just ones that you have created. For example, you might want to add a frequently used command to the Right-click field of an existing toolbar button (if it doesn't already have one). You can also enter a series of commands in the Left or Right button command field, such as a macro.

More detailed help is available in the Rhino Help file, in the Toolbar Layout chapter.