General procedure to create custom tools
- Create a Partial CUI file.
- Optional: Add toolbox(es) in a Menu Group.
- Optional: Add tools in a toolbox
- Optional: Add main menu(s)
- Optional: Add sub menu(s)
- Optional: Add context menu(s)
- Optional: Add toolbar(s)
- Optional: Add flyout(s) to toolbar(s)
- Optional: Add control(s) to toolbar(s)
- Optional: Add keyboard shortcuts
- Optional: Add existing tools to menus, toolbars or shortcuts
- Optional: Create new tools in menus, toolbars or shortcuts
- Optional: Change the tool order in menus and toolbars
Tutorial: Easy Menu Customization
Click here to watch
Tutorial: Advanced Menu Customization
Click here to watch
To create a Partial CUI file
-
In the Customize dialog do one of the following:
- In the File menu, choose Create new partial CUI file ...
- Place the cursor on Menu group, then right click an choose Create new partial CUI file ... in the context menu.
-
The Create a Customization File dialog opens.
By default the new partial CUI file will be created in the Support folder of the Roamable root folder.B
Optional select a different folder to save the CUI file. -
Type a name for the new CUI file in the File name field.
- Click the Save button.
The newly created Partial CUI file is loaded and a Menu Group of the same name is created in the Menus tree, Toolbars tree, Keyboards tree and Available Tools tree.
To add a toolbox in a menu group
-
In the Customize dialog select a menu group.
-
Right click and choose Append toolbox in the context menu.
-
Type a name for the new toolbox in the Title field of the Add toolbox dialog.
-
Click the OK button.
The toolbox is added in the Available Tools tree. -
Click the Apply button to save the definition.
To add a tool in a toolbox
-
In the Customize dialog select a toolbox in the Available Tools tree.
-
Right click and choose Append tool in the context menu.
The Add tool dialog displays.
-
Type a name for the new tool in the Title field of the Add tool dialog.
-
Optional Type a help string in the Help field of the properties grid.
-
Type a command or command macro in the Command field of the properties grid.
e.g.: ^c^c_-layer;m;InteriorWalls;;Mline
In the above example a macro is created which makes the InteriorWalls layer current, then launches the Mline command. If the layer does not exist yet, it is created first. -
Click the Browse button (
), then select an image for the new tool.
Do one of the following:- Select Builtin , then choose one of the built-in icons.
Select Bitmap file , and choose a bmp, gif, jpg, jpeg or png image file. - Click the OK button.
- Select Builtin , then choose one of the built-in icons.
-
The tool is added in the toolbox.
NOTE |
Syntax to create macros:
|
To add a main menu
New menus are added above the selected existing menu or as the first menu if you select the Main Menus subgroup.
-
In the Customize dialog click the Menus tab.
-
Do one of the following:
- Click the Main Menus subgroup of the menu group, then right click and choose Append main menu in the context menu.
- Select an existing menu in the Main Menus subgroup, then right click and choose Insert main menu in the context menu.
-
Type a name in the Title field of the Add main menu dialog.
-
Click the OK button.
-
Optional Repeat steps 2 through 5 to add more menus.
-
Click the Apply button to save the definition(s).
NOTE |
The new main menu is not added to the Menu bar until at least one menu items is added to it. |
To add a submenu to a menu
New submenus are added above the selected existing item or as the first item if you select the menu.
-
In the Customize dialog click the Menus tab.
-
If collapsed, expand the menu group (e.g. BRICSCAD).
-
If collapsed, expand the Main menus group of the menu group.
-
Do one of the following:
- Select the menu, then right click and choose Append submenu in the context menu.
- Select an existing item in the menu, then right click and choose Insert submenu in the context menu.
-
Type a name in the Title field of the Add submenu dialog.
-
Click the OK button.
To add a context menu
New context menus are added above the selected existing context menu or as the first context menu if you select the Context Menus subgroup.
-
In the Customize dialog click the Menus tab.
-
Do one of the following:
- Select the Context Menus subgroup of the menu group, then right click and choose Append context menu in the context menu.
- Select an existing context menu, then right click and choose Insert context menu in the context menu.
-
Select a menu in the menu list of the Add context menu dialog.
-
Optional: Select As regular context menu, then click the Add Context... button. The Add context alias dialog box displays:
Choose:
- CMCOMMAND: to replace the default Command context menu.
- CMDEFAULT: to replace the default Default context menu.
- CMEDT: to replace the default Edit context menu.
- GRIPS: to replace the default Grips context menu.
- SNAP: to replace the default Entity Snap context menu.
-
Click the OK button to confirm.
-
Optional repeat the previous step to add another alias.
Select an alias, then click the Remove button to remove the alias.
-
Optional Select As context menu on specific entities: , then click the Add Entity Type(s)... button.
The Add Entity Alias dialog box displays:
Select one or more entity types in the list.
Do one of the following, then click the OK button to confirm.- Check the One entity option: the context menu applies if one entity is selected only.
- Check Multiple entities : the context menu applies in multiple entities are selected only.
- Check both options: the context menu applies if one or more entities are selected.
-
Type a name in the Menu title field.
-
Click the OK button to save the context menu.
-
Optional: Repeat steps 2 through 5 to add more context menus.
To add a toolbar
New toolbars are added above the selected existing toolbar or as the first toolbar if you select the menu group.
-
In the Customize dialog click the Toolbars tab.
-
Do one of the following:
- Select a menu group, then right click and choose Append toolbar in the context menu.
- Select an existing toolbar in a menu group, then right click and choose Insert toolbar in the context menu.
-
Type a name in the Title field of the Add toolbar dialog.
-
Click the OK button.
-
Optional: Adjust the Toolbar properties.
- Title: The toolbar name must include alphanumeric characters with no punctuation other than a dash (–) or an underscore (_). The Title along with the Alias enables the toolbar to be referenced programmatically.
-
Position: Defines the display position of the toolbar when the CUI file is loaded.
The options are: Floating, Top, Left, Bottom or Right. The latter four refer to the window edge where the toolbar will be docked. - Display: Defines whether the toolbar displays or not when the CUI file is loaded.
-
Rows: Specifies the number of rows when the toolbar position is floating.
View bars with controls cannot have multiple rows. - Xval: When the position is Floating, specifies the X coordinate in pixels, measured from the left edge of the screen to the left side of the toolbar.
- Yval: When the position is Floating, specifies the Y coordinate in pixels, measured from the top edge of the screen to the top of the toolbar.
-
Click the Apply button to save the definition(s).
NOTE |
The new toolbar is loaded only if the Display property is set to Show. See Opening a Toolbar for more information on opening toolbars. |
To add a flyout to a toolbar
-
In the Customize dialog click the Toolbars tab.
-
If collapsed, expand the menu group (e.g. BRICSCAD).
-
Do one of the following
- Select a toolbar, then right click and choose Append Flyout in the context menu, to add the flyout at the end of the toolbar.
- Expand the toolbar, right click a tool then choose Insert flyout in the context menu, to add the flyout above the selected tool.
-
The Add flyout dialog box displays:
Type a name in the Title field of the Add flyout dialog, then click the OK button.
A new empty toolbar is created and inserted as a flyout in the selected toolbar:
-
Do one of the following:
- Click the Target Alias field, then click the settings field and select an existing toolbar in the drop-down list.
- Add tools to the new toolbar.
To add a control to a toolbar
-
In the Customize dialog click the Toolbars tab.
-
If collapsed, expand the menu group (e.g. BRICSCAD).
-
Do one of the following:
- Select the toolbar, then right click and choose Append control in the context menu.
The new control will be added as the first item in the toolbar. - Select an existing item in the toolbar, then right click and choose Insert control in the context menu.
The new control will be added above the selected existing item.
- Select the toolbar, then right click and choose Append control in the context menu.
-
Select a control in the Add control dialog.
-
Click the OK button.
-
To specify the width of the control, do one of the following:
- Accept the Default width.
- Type the width in pixels in the Width field.
NOTE |
Type Default or 0 (zero) in the Width field to restore the default width of the control field. |
To add a keyboard shortcut
-
In the Customize dialog click the Keyboard tab.
-
If collapsed, expand the menu group (e.g. BRICSCAD).
-
Do one of the following:
- Select the menu group, then right click and choose Append shortcut in the context menu.
The new shortcut will be added at the end of the shortcut list. - Select an existing shortcut in the toolbar, then right click and choose Insert shortcut in the context menu.
The new shortcut will be added above the selected existing shortcut.
- Select the menu group, then right click and choose Append shortcut in the context menu.
-
Do one of the following:
- Proceed with the Add an existing tool procedure.
- Proceed with the Add a new tool procedure.
-
In the Properties grid of the new shortcut select the Key field, then press the key combination you want to assign to the shortcut.
To add an existing tool to a menu, toolbar or shortcut
-
In the Customize dialog select the item you want to add an existing tool to.
-
In the Available Tools pane, expand the toolbox that contains the tool you want to add.
-
Drag the tool to the target item:
- Drop the tool on top of the item name to append the tool.
- Drop the tool on top of another tool to insert the new tool above the existing tool.
-
Optional: Edit the tool in the settings grid, e.g. to add a diesel expression in the Diesel field.
To create a new tool
-
In the Add Tool dialog choose Create new tool.
-
Select the Toolbox in which you want to create the new tool.
-
Type a name for the new tool in the Title field of the Add tool dialog.
-
Optional: Type a help string in the Help field of the properties grid.
-
Type a command or command macro in the Command field of the properties grid.
In the screenshot above the Command field contains a macro that makes the InteriorWalls layer current, then launches the Mline command.If the layer does not exist yet, it is created first. -
Click the Browse button (
), then select an image for the new tool.
-
Do one of the following:
- Select Builtin, then choose one of the built-in icons.
- Select Bitmap file , and choose a bmp, gif, jpg, jpeg or png image file.
- Select Builtin, then choose one of the built-in icons.
-
Click the OK button to create the new tool.
To change the order of the tools in a menu or toolbar
-
In the Customize dialog select the menu or toolbar.
-
Drag the tool to its new position:
- Drop the tool on top of the item name to move it to the last position.
- Drop the tool on top of another tool to move the tool above this tool.