Creating custom tools

General procedure to create custom tools

  1. Create a Partial CUI file.

  2. (option) Add toolbox(es) in a Menu Group.

  3. (option) Add tools in a toolbox

  4. (option) Add Main Menu(s)

  5. (option) Add menu items in a menu

  6. (option) Add Context Menu(s)

  7. (option) Add toolbar(s)

  8. (option) Add tool(s) to a Toolbar

  9. (option) Add Keyboard Shortcuts

To create a Partial CUI file

  1. In the Customize dialog do one of the following:

  2. In the File menu, choose Create new partial CUI file ... .

  3. 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 .

  1. (option) Select a different folder to save the CUI file.

  2. Type a name for the new CUI file in the File name field.

  3. 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.

 

go to top

To add a toolbox in a menu group

  1. In the Customize dialog select a menu group.

  2. Right click and choose Append toolbox in the context menu.

  3. Type a name for the new toolbox in the Title field of the Add toolbox dialog.

  1. Click the OK button.
    The toolbox is added in the Available Tools tree.

  2. Click the Apply button to save the definition.

 

go to top

To add tools in a toolbox

  1. In the Customize dialog select a toolbox in the Available Tools tree.

  2. Right click and choose  Append tool in the context menu.

  3. Type a name for the new tool in the Title field of the Add tool dialog.

  1. Click the OK button.
    The tool is added in the toolbox.

  1. (option) Type a help string in the Help field of the properties grid.

  2. Type a command or command macro in the Command field of the properties grid.

In the above example the Command  field contains a macro that makes the InteriorWalls layer current, then launches the polyline command.
If the layer does not exist yet, it is created first.

  1. To assign an image to the tool proceed with steps 5 and 6 in the Create a new tool procedure.

  1. Click the Apply button to save the tool definition.

 

NOTE

  • ^c^c is the equivalent of pressing the Esc key twice, which first ends a running command if necessary.

  • an underscore (_) in front of a command name ensures that the macro still works in a non-English version of BRICSCAD.

  • a point (.) in front of a command name ensures that the macro still works if this command is temporarily undefined (see the UNDEFINE  and REDEFINE commands).

  • a minus sign (-) in front of a command launches the command line version of a command, thus preventing the command dialog window to open.

  • a semicolon (;) is the equivalent of pressing the Enter key

  • a backslash (\) waits for user input, e.g. specifying a point.

 

go to top

To add a main menu

  1. In the Customize dialog click the Menus tab.

  2. Do one of the following:

  3. Click the Main Menus subgroup of the menu group, then right click and choose Append main menu in the context menu.

  4. Select an existing menu in the Main Menus subgroup, then right click and choose Insert main menu in the context menu.

New menus are added above the selected existing menu or as the first menu if you select the Main Menus subgroup.

  1. Type a name in the Title field of the Add main menu dialog.

  1. Click the OK button.

  2. (option) Repeat steps 2 through 5 to add more menus.

  3. 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.

 

go to top

To add an item to a menu

  1. In the Customize dialog click the Menus tab.

  2. If collapsed, expand the menu group (e.g. BRICSCAD).

  3. If collapsed, expand the Main menus group of the menu.

  4. Do one of the following:

  5. Select the menu, then right click and choose Append item in the context menu.
    The new item will be added as the first item in the menu.

  6. Select an existing item in the menu, then right click and choose Insert item in the context menu.
    The new item will be added above the selected existing item.

  1. Do one of the following:

  2. Proceed with the Add an existing tool procedure.

  3. Proceed with the Add a new tool procedure.

  1. (option) Add a Diesel expression in the Diesel field.

 

go to top

To add an existing tool to a menu, toolbar or shortcut

  1. In the Add Tool dialog choose Select available tool.

  1. Expand the toolbox in the menu group of the menu, toolbar or shortcut in which you want to add the tool.

  2. Select the tool you want to add.

  1. Do one of the following:

  2. Double click the tool.

  3. Click the OK button on the Add tool dialog.

The tool is added.

 

NOTE

You can select tools of the same menu group only.

 

go to top

Create a new tool in a menu, toolbar or shortcut

  1. In the Add Tool dialog choose Create new tool.

  1. Select the Toolbox in which you want to create the new tool.

  1. Type a name in the Title field.

  2. Type a help string in the Help field.

  3. Type a command or command macro in the Command field.
    In the above example the ^c^c^c-boundary command launches the Boundary command without a dialog.

  4. Click the browse button at the right hand side of the Image field.
    The Tool image dialog opens.

  5. Do one of the following:

  6. Choose Builtin, then select one of the built-in images and click the OK button.


     

  7. Choose Bitmap file then click the browse button.


    x
    In the Select bitmap file dialog, select a bitmap and click the Open button.



    Click the OK button to confirm your choice.



    If no path is specified, image files must exist in the Support folder of  the Roamable root folder.
    If an image file is not found, a question mark icon displays instead in the menus, toolbars or keyboard shortcuts in which the tool is used.

  8. Click the OK button on the Add tool dialog.

 

go to top

To add a submenu to a menu

  1. In the Customize dialog click the Menus tab.

  2. If collapsed, expand the menu group (e.g. BRICSCAD).

  3. If collapsed, expand the Main menus group of the menu group.

  4. Do one of the following:

  5. Select the menu, then right click and choose Append submenu in the context menu.

  6. Select an existing item in the menu, then right click and choose Insert submenu in the context menu.

New submenus are added above the selected existing item or as the first item if you select the menu.

  1. Type a name in the Title field of the Add submenu dialog.

  2. Click the OK button.

To add an item to a submenu

  1. Do one of the following:

  2. Select the submenu, then right click and choose Append item in the context menu.
    The new item will be added as the first item in the submenu.

  3. Select an existing item in the submenu, then right click and choose Insert item in the context menu.
    The new item will be added above the selected existing item.

  1. Do one of the following:

  2. Proceed with the Add an existing tool procedure.

  3. Proceed with the Add a new tool procedure.

 

go to top

To add a context menu

  1. In the Customize dialog click the Menus tab.

  2. Do one of the following:

  3. Select the Context Menus subgroup of the menu group, then right click and choose Append context menu in the context menu.

  4. Select an existing context menu, then right click and choose Insert context menu in the 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.

  1. Select a menu in the menu list of the Add context menu dialog.

  1. Click the OK button.

  2. (option) Repeat steps 2 through 5 to add more context menus.

  3. Click the Apply button to save the definition(s).

 

NOTE

If you create a context menu in a partial menu group it will only be used if such context menu does not exist in the main menu group.

 

go to top

To add a toolbar

  1. In the Customize dialog click the Toolbars tab.

  2. Do one of the following:

  3. Select a menu group, then right click and choose Append toolbar in the context menu.

  4. Select an existing toolbar in a menu group, then right click and choose Insert toolbar in the context menu.

New toolbars are added above the selected existing toolbar or as the first toolbar if you select the menu group.

  1. Type a name in the Title field of the Add toolbar dialog.

  1. Click the OK button.

  2. (option) Adjust the Toolbar properties.

  1. (Option) Repeat steps 2 through 6 to add more toolbars.

  2. Click the Apply button to save the definition(s).

To add a tool to a toolbar

  1. In the Customize dialog click the Toolbars tab.

  2. If collapsed, expand the menu group (e.g. BRICSCAD).

  3. Do one of the following:

  4. Select the toolbar, then right click and choose Append tool in the context menu.
    The new tool will be added as the first tool in the toolbar.

  5. Select an existing item in the toolbar, then right click and choose Insert tool in the context menu.
    The new tool will be added above the selected existing item.

  1. Do one of the following:

  2. Proceed with the Add an existing tool procedure.

  3. Proceed with the Add a new tool procedure.

  1. (option) Add a Diesel expression in the Diesel field.

 

NOTES

The new toolbar is loaded only if the Display property is set to Show. See Opening a Toolbar for more information on opening toolbars.

 

go to top

To add a control to a toolbar

  1. In the Customize dialog click the Toolbars tab.

  2. If collapsed, expand the menu group (e.g. BRICSCAD).

  3. Do one of the following:

  4. 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.

  5. 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.

  1. Select a control in the Add control dialog.

  1. Click the OK button.

  2. To specify the width of the control, do one of the following:

  3. Accept the Default width.

  4. 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.

 

 

go to top

To add a flyout to a toolbar

  1. In the Customize dialog click the Toolbars tab.

  2. If collapsed, expand the menu group (e.g. BRICSCAD).

  3. Select an existing item in the toolbar, then right click and choose Insert flyout in the context menu.
    The flyout is added above the selected item.

  4. Type a name in the Title field of the Add flyout dialog.

  5. Click the OK button.

To add a tool to a flyout

  1. Do one of the following:

  2. Select the flyout, then right click and choose Append tool in the context menu.
    The new tool will be added as the first tool in the flyout.

  3. Select an existing item in the flyout, then right click and choose Insert tool in the context menu.
    The new tool will be added above the selected existing item.

  1. Do one of the following:

  2. Proceed with the Add an existing tool procedure.

  3. Proceed with the Add a new tool procedure.

  1. (option) Add a Diesel expression in the Diesel field.

 

go to top

To add a keyboard shortcut

  1. In the Customize dialog click the Keyboard tab.

  2. If collapsed, expand the menu group (e.g. BRICSCAD).

  3. Do one of the following:

  4. 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.

  5. 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.

  1. Do one of the following:

  2. Proceed with the Add an existing tool procedure.

  3. Proceed with the Add a new tool procedure.

  1. In the Properties grid of the new shortcut select Key field, then press the key combination you want to assign to the shortcut.

 

go to top

 


© Menhirs NV. All rights reserved.