Passer au contenu principal

Customizing the interface

…Rhino offers several customization mechanisms, all of which apply to rhinoCapture. This appendix describes the three main ones:

  • toolbars and their buttons,
  • aliases,
  • keyboard shortcuts.
💡 Two other customizations, specific to rhinoCapture STEREO, are covered in their respective chapters:
• radial menus (files OXARoundMenu.xml and RCARoundMenu.xml )

• pointing devices (the file ControllerConfig.xml )

Toolbars

Creating a toolbar

In the menu, use the “Tools \ Options…” command, then select the “Toolbars” page

Menu: Tools\Options…
Command line: Options or _Options

In the dialog shown here, use “File\New” to choose the name of the definition file for your new toolbar, as well as its location.

The definition file of your new toolbar has the extension “.rui”. We recommend that you always back it up after any change !

A well-designed toolbar that you are used to is essential. It brings comfort and speed… it is valuable and must be restorable if needed.

Then click “Edit\New Toolbar” to add a toolbar. By default, the newly created toolbar is called “Toolbar”. Double-click its name or press F2 to rename it.

Check the box to the left of its name to make sure the toolbar will be visible once the dialog is closed.

Click the Add button to add your first button.

In the dialog that appears, click Next to display the dialog for setting up the new command associated with the left click of the button you have just created:

In the example above, the command associated with the button makes the “Buildings” layer current and starts the polyline command: ! _-Layer _Current "Buildings" _Enter _Polyline

Note the - in front of Layer, which prevents its dialog from opening, and the straight quotes around "Buildings": optional here, they become essential as soon as the name contains a space (see “About command macros” below).

Fill in the fields:

  • Name  — : the name of the macro (this is what appears in Rhino's lists)
  • Image  — : to choose the image displayed on the button
  • Command — : the macro itself, run when the button is clicked
  • Button text  — : to choose the text optionally displayed below the button
  • Menu text  — : to choose the text displayed if this macro were used in a menu
  • Help text — : to choose the text displayed in the status bar when the pointer hovers over the button
  • Tooltip — : to choose the text displayed when hovering over the button.

Click Next again. The next dialog lets you, if you wish, assign a second action to the button, run by a right click of the mouse.

Click Next again, then Finish.

You can then close the Rhino Options dialog by clicking OK.

Creating a new button

There are two ways to add a new button to your toolbar afterwards:

  • from the Rhino Options dialog and, as when creating the toolbar, by clicking the Add button after selecting your toolbar in the “Toolbars and toolbar groups” list.
  • by right-clicking in your toolbar and selecting “New Button…”.

In both cases, then fill in the parameters of the button and its macro, as described above.

Adding an existing button to your toolbar (Copy)

To copy a button from an existing toolbar to yours, hold down the [CTRL] key, then click the button to copy and hold down the left mouse button. The button now follows your movements. Drag it onto your toolbar and release the left button to drop the copied button on your toolbar.

💡 Once the [CTRL] key is held down, hovering over a button displays the “Copy Link” tooltip

Adding a separator

Right-click in your toolbar and select “New Separator”.

Moving a button or a separator

To move a button or a separator within your toolbar, hold down the [SHIFT] key, then click the button to move and hold down the left mouse button. The button now follows your movements. Release the left button to drop the button at its new position.

💡 Once the [SHIFT] key is held down, hovering over a button displays the “Move Edit” tooltip

Editing a button

Right-click in your toolbar, select “Edit Button” and, in the menu that appears, choose the button to edit.

💡 You can also open a button's properties directly by right-clicking it while holding down the [SHIFT] key

Deleting a button

Right-click in your toolbar, and hover over the button to delete in the “Edit Button” menu. You can delete the button by clicking the small cross displayed to the right of your button's label. Once you have confirmed the deletion, the button is removed from your toolbar.

Showing / hiding a toolbar

Right-clicking in any toolbar displays a context menu. In this menu, the “Show Toolbar” item displays the list of all defined toolbars.

In this menu, toolbars are grouped under a heading corresponding to the name of their definition file. Select the name of a toolbar to show or hide it, depending on its current state.

A displayed toolbar appears in the menu preceded by a check mark; a hidden toolbar has none.

Aliases

Command aliases are a bit like shorthand in Rhino: short abbreviations that you type in the command line and confirm with [Enter], to run a command or a macro.

To create a command alias, in the menu, use the “Tools \ Options…” command

Menu: Tools\Options…
Command line: Options or _Options

Select the “Alias”

Click “New”

In the “Alias :” column, enter for example “otm”

In the “Command macro:” column, enter: ! _Oxalis_ToggleConnection_TopoMouse (note the space between ! and _Oxalis…)

From now on, typing otm followed by [Enter] in the command line will connect or disconnect the TopoMouse (command Oxalis_ToggleConnection_TopoMouse).

💡 About “command macros”
• The [space] character is equivalent to [Enter]. This means there can be no space in names (of layers, objects, folders). If there is one, enclose the name in quotes.

• The ! character followed by a space cancels any command that may be running. That is why macros usually begin with “!”: yours then runs from a known state, without interfering with a command left active.

• The _ (Underscore) character in front of a command name calls that command by its English name, whatever the interface language. The _ prefix therefore ensures that your macros work on every Rhino installation.

• The - (Single hyphen) character in front of a command name prevents its dialog from opening: parameters are then entered through the command prompt and its options.

Keyboard shortcuts

Shortcuts are commands and macros triggered by a function key or by a combination of the [CTRL], [ALT], [SHIFT] keys and alphanumeric keys.

To create a shortcut:

Menu: Tools\Options…
Command line: Options or _Options

Select the “Keyboard” page

Click in the column next to F4

In the “Command macro” column, enter: ! _Invert _Hide

From now on, the [F4] key will hide all objects other than the selected ones (isolating the selection).

💡 Keyboard shortcuts — like aliases — are stored in the Rhino options, which are specific to the workstation: they are not part of the .rui file and are therefore not carried along when you back up your toolbar.
Remember to recreate them if you replicate your environment on another computer.
To do this, you can use the “Tools\Export Options…” and “Tools\Import Options…”