2D Drafting 3D Modelling BIM Mechanical Applications

Customize Toolbars and Button Icons - Customizing BricsCAD® - P8

By Ralph Grabowski 23 min April 5, 2020
Customize Toolbars and Button Icons - Customizing BricsCAD® - P8

In this post I will explain how to customize toolbars and button icons are handled by the Customize dialog box.

The best way to customize commands in BricsCAD is through toolbars -- in my opinion. Toolbars give me single-click access to almost any command or group of commands and let us collect our most-used commands into one or more convenient strips.


The following topics are covered in this post:

  • Customizing the look of toolbars and buttons
  • Creating new toolbars and flyouts
  • Understanding controls and separators

BricsCAD lets you customize these aspects of toolbars:

    • Name, default position, size and default visibility of toolbars
    • Flyouts and separator bars
    • Titles, macros, help strings and button images

Customizing the Look of Toolbars

There are two ways to customize toolbars in BricsCAD:

  • Change the look of toolbars
  • Change the macros executed by toolbar buttons

The first one is simpler, as it involves cosmetic changes, such as rearranging buttons, making new icons or defining new toolbars. The second way involves programming by (re)writing macros that activate one or more commands when the toolbar button is clicked.

First, here is how to change the looks of toolbars.

REARRANGING TOOLBARS

The first time you start a fresh copy of BricsCAD in the toolbar workspace, you'll see that it has several toolbars docked along the edges of the drawing area. "Docked" means that when you move the main BricsCAD window, docked toolbars move along with it.

Customize Toolbars and Button Icons - Untitled-1-e1583763517304-1024x507

Docked and floating toolbars

Toolbars don't have to be docked; they can float. When toolbars float, they are independent of the BricsCAD window. When you move or resize the BricsCAD window, the floating toolbars remain where they are.


QUICK SUMMARY OF TOOLBAR COMMANDS & VARIABLES

The following command works with toolbars:

Toolbar and -Toolbar --- displays and hides toolbars by name, at the command line

The following variables work with toolbars:

ToolbarIconSize --- changes the size of icons between regular, large and extra large

MenuName --- reports the path and name of the current menu file


Tutorial: Dragging and Moving Toolbars

Look closely at the left end of a toolbar that is docked. There you see a line of dots, shown in the figure above. This is called the "drag handle." By dragging the handle, you move the toolbar to another location in the BricsCAD window or make it float.

You move floating toolbars by dragging them by their title bars. Floating toolbars can be relocated to other edges of the drawing area --- or left floating on the screen.

Here is how to move toolbars:

  1. Position the cursor over the drag handle (line of dots).

  2. Hold down the left mouse button and then move the mouse.

  3. Drag the toolbar away from the edge of the drawing area. Notice the thin, gray, rectangular outline. This is called the dock indicator, as shown by the figure below.

    Customize Toolbars and Button Icons - 1-1024x133

    Moving a docked toolbar

    If you were to release the mouse button at this point, the toolbar would jump back to its docked position.

    TIP You prevent the toolbar from docking inadvertently by holding down the Ctrl key.To prevent any toolbar or panel (palette) from moving, use the LockUI variable. Its options are listed in the Settings dialog box, as follows:Customize Toolbars and Button Icons - 47-1024x212

  4. Drag the toolbar a bit further and notice that the rectangular outline becomes thicker. This is called the float indicator.

    Customize Toolbars and Button Icons - 3-1024x196

    Symbology for a floating toolbar

  5. Let go of the mouse button now and the toolbar floats. With the toolbar floating, you move it around by dragging its title bar.

  6. To dock the toolbar again, drag it by its title bar back against one edge of the drawing area and then let go of the mouse button.


QUICK SUMMARY OF TOOLBAR PARAMETERS

The look and position of every toolbar is defined by an individual set of parameters defined by the Customize dialog box. Here is an overview of the meaning of the parameters.

Customize Toolbars and Button Icons - Untitled-1-e1583763517304-1024x507

toolbar parameter BricsCAD

Title --- identifies the toolbar to the BricsCAD system and appears on the title bar of the toolbar (you can make the title any descriptive phrase that you like)

ID --- BricsCAD assigned identification of the UI element; read-only (cannot be edited)

Alias --- code name assigned by BricsCAD to identify this toolbar (although you can edit this value, I suggest that this would be an unwise move)

Default Display (formerly Visible) --- determines whether the toolbar is displayed or hidden when BricsCAD starts up; choose from Add to Workspaces and Don't Add to Workspaces

Rows --- number of rows of a floating toolbar

Xval and Yval --- x and y coordinates of a floating toolbar's upper left corner, as measured from BricsCAD's upper left corner


TIP Although not a toolbar, the Command Bar can also be made to float and resize. To float, drag the left edge into the drawing area.Customize Toolbars and Button Icons - 2 (1)

Once floating, you can move the Command Bar window by its title bar and resize it by its edges --- just like a toolbar. To dock it again, drag the Command Bar window back into place.

To turn the Command Bar on and off, press Ctrl+9 (Cmd+9 on Mac).


Tutorial: Turning Toolbars On and Off

When you want to turn on a toolbar (or turn one off), then follow these steps:Customize Toolbars and Button Icons - 5 (1)

  1. Customize Toolbars and Button Icons - 4 (3)
    Accessing UI elements from the shortcut menu

    Right-click any toolbar or the ribbon. Notice that a shortcut menu appears. (new in V20) This shortcut menu was redesigned in BricsCAD V20.
    Panels --- lists the names of panels
    Panel Stacking --- options for how multiple panels are displayed
    Toolbars --- lists the names of toolbars, illustrated at right
    Toolbar size --- change the size of icons between normal, large and extra large
    Workspace --- select the workspace to make current
    Menu Bar --- toggles the menu bar on and off Status bar --- toggles the status bar
    Clean Screen --- toggles the clean screen state
    Dark interface (new in V20) --- toggles the theme between light and dark interface
    Customize --- opens the Customize dialog box

  2. Click Toolbars and then click BRICSCAD. A submenu lists the names of toolbars, as illustrated at right. The check mark means that the toolbar associated with the name is turned on (displayed):

    • Turn on a toolbar select its name from the submenu. Notice that the shortcut menu disappears and the toolbar appears.
    • Turn off a toolbar click a name *with *a check mark.

TIPS You can turn on (or off) all toolbars at once through the Toolbar command, as follows::toolbar Enter Toolbar name, or <ALL>: all Enter an option [Show/Hide] <Show>: sThis command can also turn on and off individual toolbars, which is useful in macros and LISP routines.When toolbars are floating, you can turn them off by clicking the red x in the upper right corner.


Making New Toolbars and Modifying Them

You create new toolbars with any set of buttons of your choosing. You can change the content of the toolbar by adding and removing buttons, controls, flyouts and separator bars --- as well as designing your own icons. Let's see what this means and how it is done.

TUTORIAL: HOW TO CREATE A NEW TOOLBAR

For this tutorial, you make a toolbar with commands related to grouping, as BricsCAD doesn't offer such a toolbar. Groups are like unnamed blocks and are easily editable. They are made with the Group command

In this tutorial you create a new toolbar named "Group" that holds the Group command.

Customize Toolbars and Button Icons - Untitled-3-1024x543

Three panes of customizing toolbars

  1. Open the Customize dialog box. I find the quickest way to do this is to type the Cui alias at the command prompt. Other methods include the following:

    • Right-click any toolbar and then from the context menu, select Customize
    • From the Tools menu, select Customize
    • Enter the Customize command
  2. When the Customize dialog box appears, choose the Toolbars tab. Notice the three panes and how they relate to toolbar customization:

    • Toolbar pane --- (on the left) lists the names of all toolbars in BricsCAD, sorted by the order in which they were created. Within each toolbar name are names of commands, represented by icons.
    • Command pane --- (on the right) lists the names of all commands available in BricsCAD, sorted by the order in which they appear in dropdown menus. For instance, file-related commands are listed under File.
    • Parameters pane --- (at the bottom) lists parameters controlling the look and function of toolbars and their buttons. Here you edit the names, command macros, button images, help strings and optional Diesel code for each button.
  3. To create the new toolbar, right-click the BRICSCAD node and then choose Append toolbar from the shortcut menu.

    Customize Toolbars and Button Icons - 6

    Appending a new toolbar

  4. Notice the Add Toolbar dialog box.

    Customize Toolbars and Button Icons - 7

    Naming the new toolbar

    For this tutorial, follow these steps:
    a. Enter "Groups" for the name
    Title: Groups
    b. Click OK

    The name will appear on the title bar of floating toolbars --- as well as identify the toolbar to BricsCAD. Notice that BricsCAD adds the new (but empty) toolbar named Group to the end of the list. Also notice that it fills out the Macro pane (in the lower half of the dialog box) with some preset parameters.

    Customize Toolbars and Button Icons - 8

    Newly created toolbar named "Groups"

  5. With the toolbar created, you now add buttons. The easiest way (I find) is to drag and drop buttons from the Tools pane onto the new Groups node. Follow these steps:
    a. Because the Groups command is listed under Tools, so scroll down to Tools.

    Customize Toolbars and Button Icons - 9

    Finding a command in a collection

    b. Open the Tools group by clicking the + sign.
    c. Choose the Groups ... item.

    Customize Toolbars and Button Icons - 10

    Choosing the Group tool

    d. Drag "Groups..." over to the Toolbars pane and then deposit on the Groups toolbar.

    Customize Toolbars and Button Icons - 11 (1)

    Newly created toolbar named "Groups"

    Notice that BricsCAD fills the Macro pane with preset parameters.

    Customize Toolbars and Button Icons - 12

  6. Click OK. Notice the new toolbar

    Customize Toolbars and Button Icons - 13

    New toolbar

    (If you do not see the toolbar, you may need to turn it on by right-clicking another toolbar and then choosing BRICSCAD | Groups from the shortcut menu.)

  7. Click the button to ensure it works correctly: the Group command should execute by displaying the Entity Grouping dialog box.

Tutorial: Alternative Method

There is a second method for populating toolbars. It involves a dialog box and is useful if you are not fond of dragging'n dropping.

(Follow steps 1-4 above.)

With the blank toolbar created, it's time to add a button. Follow these steps:

    1. In the Toolbars pane, right-click the Groups item.

    2. From the shortcut menu, choose Append Tool.

      Customize Toolbars and Button Icons - 14

      Using the Append Tool alternative

    3. Notice the Add Tool dialog box. Ensure that the Select Available Tool option is selected.

      Customize Toolbars and Button Icons - 15

      Choosing the Grouo tool

      d. As before, you can find the Groups command under Tools, so scroll down to Tools and then open the Tools group by clicking the + sign.
      e. Choose Groups and then click OK. Notice that BricsCAD fills the Macro pane with preset parameters.

      Customize Toolbars and Button Icons - 16

      Group command added to the Groups toolbar

Adding Controls, Flyouts and Separators

Toolbars can contain more than just buttons. There are other elements available, including controlsflyouts and separators.

ABOUT CONTROLS (DROPLISTS)

Controls are better known as droplists . When the user clicks a control, BricsCAD drops a list of options, such as names of colors or linetypes. You cannot customize controls.

Four controls are illustrated below, with the Color control showing its droplist. From left to right, you see the controls for layers, colors, linetypes and line weights.

Customize Toolbars and Button Icons - 17-1024x354

Color control lists the names of colors
BricsCAD comes with these controls that you can add to and remove from toolbars:.

  • Color --- droplist of default and recently-used colors
  • Layer --- droplist of layer names and settings
  • Linetype --- droplist of loaded linetypes
  • Lineweight --- droplist of standard line weights
  • Text Style --- droplist of text style names
  • Dimension Style --- droplist of dimension style names
  • Plot Style --- droplist of table plot style names; available only when table-based styles are enabled
  • Layer State --- droplist of named layer states
  • Layer Filter --- droplist of named layer filters
  • UCS --- droplist of named UCSes
  • Perspective --- slider bar that toggles perspective mode and then zoom in or out
  • Workspace --- droplist of available workspace names
  • View --- droplist of named views
  • MLeader Style --- droplist of multileader style names
  • Visual Style --- droplist of visual style names

Tutorial: Adding Controls (Droplists) to Toolbars
To add a control to a toolbar, follow these steps:

  1. In the Customize dialog box's Toolbars tab, right-click an existing toolbar name. For this tutorial, choose Groups.

  2. In the shortcut menu, choose Append control.

    Customize Toolbars and Button Icons - 18

    Choosing the Append tool from the shortcut menu

  3. Notice the Add Controls dialog box. Choose the name of a control, such as "Color," and then click OK.

    Customize Toolbars and Button Icons - 19

    List of controls

    Notice that the control is added to the toolbar's list.

    Customize Toolbars and Button Icons - 20

    Control added to toolbar

  4. Click Apply to see the control in the actual toolbar.

Customizing Controls (Droplists)

You cannot create new controls, but you can customize one aspect of them: their width.

Customize Toolbars and Button Icons - 21

Pair of parameters for controls

Here is what the parameters mean:

Control --- changes the control displayed by the toolbar. Click to choose another one from the drop list:

Customize Toolbars and Button Icons - 22

Changing the control

Width --- specifies the width of the control. Click to enter a new width, which is measured in pixels. The figure below shows how the width is measured on docked and floating toolbars. The width measurement includes the gray line at either end of the white area.

Customize Toolbars and Button Icons - Untitled-4-1024x329

Setting the width of the control

ABOUT FLYOUTS

Flyouts are sub-toolbars that "fly out" from a toolbar button, as illustrated below.

Customize Toolbars and Button Icons - Untitled-5-768x308

The presence of a flyout is indicated by the small black triangle in the lower right corner of a toolbar button. Since flyouts are just toolbars within toolbars, you customize them kind of like a toolbar.

Tutorial: Adding Flyouts to Toolbars

To add flyouts, it's a bit tricky. Here are the steps involved:

  1. Right-click an existing toolbar. For this tutorial, choose Group.

  2. In the shortcut menu, choose Append Flyout.

    Customize Toolbars and Button Icons - 23

    Inserting a flyout

  3. Notice the Append Flyout dialog box. Give the flyout a name and then click OK. (For this tutorial, I use the name "Flyout Sample.")

    Customize Toolbars and Button Icons - 24

    Naming the new flyout

    Notice that the flyout appears twice: once as a sub-toolbar and again as a toolbar in its own right.

    Customize Toolbars and Button Icons - 25

    Double appearance of the flyout

  4. You can now populate the flyout with tools in two place: the embedded Flyout Sample sub-toolbar or the vestigial Flyout Sample toolbar. The difference between them is as follows:

    • Embedded sub-toolbar --- you must use the Append tool; you cannot use the Insert tool nor can you drag commands from the Commands pane
    • Vestigial toolbar --- you can use the Insert tool and can drag commands from the Commands pane.

    Any change you make to the vestigial toolbar appear in the embedded toolbar. I recommend using the vestigial toolbar, because you can simply drag'n drop. Drag tools from the Command pane onto the Flyout Sample toolbar.

    Customize Toolbars and Button Icons - 26

    Dragging and dropping commands into a toolbar

  5. To add more commands to the flyout, repeat step 5. Notice that both toolbars contain the same list of commands.

  6. Click OK to apply the changes and then view the changed toolbar.

The customized Groups toolbar now looks something like this:

Customize Toolbars and Button Icons - 29

Toolbar with a button, a flyout and a control

Because flyouts are simply toolbars, you can customize them just as you do toolbars. You cannot, unfortunately, simply drag existing toolbars on top of others to turn them into flyouts.

ABOUT SEPARATORS

Separators are those lines that separate groups of buttons, as shown below. These are handy for visually segregating related groups of buttons. There is nothing to customize about separators: either you add them to a toolbar or you do not.

Tutorial: Adding Separators to Toolbars

To add a separator to a toolbar, follow these steps:

  1. Open a toolbar by clicking the + button. For this tutorial, choose Groups.

  2. Select a tool name, such as the Color control. The separator bar is added in front of the selected tool.

  3. Right-click and then choose Add separator.

    Customize Toolbars and Button Icons - 27

    Choosing to add a separator

    Notice a row of dashes ( ------ ) is added to the Groups node, indicating the position of the separator bar.

    Customize Toolbars and Button Icons - 28

    Separator indicated by row of dashes

    If you don't like the position of the separator, drag it elsewhere.

  4. On the toolbar itself, a vertical gray line appears. Click Apply to see the change to the toolbar.

    Customize Toolbars and Button Icons - 27

    Separator added to toolbar

That's about as easy as it gets!

REMOVING BUTTONS, RENAMING AND DELETING TOOLBARS

You can remove buttons, rename toolbars and delete them. To perform these actions, open up the Customize dialog box, go to the Toolbars tab and then choose the toolbar you want to edit.

Tutorial: Removing Buttons and Toolbars

To remove a button from a toolbar:

  1. Right-click a button's name and then choose Delete.

    Customize Toolbars and Button Icons - 30

    Deleting a toolbar button

  2. When BricsCAD asks whether you are sure, choose Yes. (You can click don't show this again).

    Customize Toolbars and Button Icons - 32

    Answering Yes (or No)

  3. Click Apply to see the toolbar with one fewer button.

The same procedure is used to delete toolbars: right-click a toolbar name and then choose Delete Toolbar.Customize Toolbars and Button Icons - 31

Tutorial: Renaming Toolbars and Buttons

You can change the names displayed by toolbars and buttons. To rename a toolbar, follow these steps:

  1. Select a toolbar in the Customize dialog

  2. In the Macro pane, choose the Title

  3. Edit the name.

    Customize Toolbars and Button Icons - 33

    Renaming a toolbar

  4. Click Apply to see the name change on the toolbar's title bar, if it is a floating toolbar.

    Customize Toolbars and Button Icons - 34

    Toolbar sporting its new name

You rename buttons in the same manner: select a button in the Customize dialog box and then edit its Title parameter.

Customize Toolbars and Button Icons - 37

Renaming a button

The name appears in the tooltip when you hover the cursor over the button.

Customizing Buttons

Buttons are customized in a manner similar to that of toolbars. The parameters that can be changed are described by the boxed text, above. To start customizing buttons, follow these steps:

  1. Enter the Cui command to open the Customize dialog box and then select the Toolbars

  2. Open any toolbar by clicking the + next to its name. For example, open Standard.

    Selecting a button to customize

  3. Select a command name, such as QNew. Notice the button parameters that appear at the bottom of the dialog box, such as Title and Diesel.

    Customize Toolbars and Button Icons - 37

    Parameters that can be modified on toolbar buttons

With the Customize dialog box ready to modify buttons, let's go on to see what can be done in regards to this.

MODIFYING BUTTON PARAMETERS

You can change the following button parameters:

  • Title --- specifies the name displayed by the tooltip. The tooltip appears when you hover the cursor over the toolbar button.
  • Help --- specifies the help text displayed on the status bar. The text appears in the status bar, again when you hover the cursor over the button.
  • Command --- specifies macro executed by clicking the button. This macro can consist of a simple command name, like line or multiple command names within a lengthy series of instructions.
  • Image --- specifies the picture (a.k.a icon) displayed by the button. You can use icons provided by Bricsys or use your own.

I recommend that you leave Diesel and Tool ID fields alone. Diesel, because its functions are carried out by the Command field; ToolID, because it's best not muck about with how BricsCAD identifies buttons internally.


SIZING BUTTONS

You can have three sizes of buttons on toolbars: regular, large and extra-large. Larger buttons are easier to see on very-high resolution monitors, but smaller ones let you see more toolbars at a time. The ToolbarIconSize variable affects all buttons on every toolbar uniformly; it has no impact on ribbon buttons.

  • Customize Toolbars and Button Icons - smallRegular: 16×16 pixels
  • Customize Toolbars and Button Icons - mediumLarge: 32×32 pixels
  • Customize Toolbars and Button Icons - largeExtra-large: 64×64 pixels

The easiest way to change the size is to right-click a UI element and then choose Toolbar Size.

Customize Toolbars and Button Icons - menu


To change the name displayed by the button's tooltip, follow these steps:

Tutorial: Editing the Title Name and the Help String

  1. Click the field next to the Title parameter.

    Customize Toolbars and Button Icons - 40

    Editing the Title parameter

  2. Edit or replace the text.

  3. Click Apply to make the change stick.

Follow the same steps to change the help text displayed by the status bar: Click the Help field, edit the text and then click Apply.

Customize Toolbars and Button Icons - 41

Editing the help text

Tutorial: Changing the Command Macro

To change the macro that is executed when you pick the toolbar button, follow these steps:

  1. Click the field next to the Command parameters.

    Customize Toolbars and Button Icons - 43

    Editing the command's macro

  2. Enter a new macro. If all you want to is to execute a single command, then use this template:
    ^c^c_ command.
    Replace "command" with the command name of your choice. For example, to execute the PLine command, then enter ^c^c_pline. (For details on writing macros, see the chapter on "Writing Macros and Diesel Code.")

  3. Click Apply.


TIP After you change a parameter, it is shown in boldface to remind you that it has changed. The boldfacing goes away after you press Apply.Click the Apply button to see the effect of changes you've made to the button(s).

Although it is not explicit, you can copy and paste text in the parameter fields, as follows:

  • To copy: select text and then press Ctrl+C.
  • To paste: place cursor and then press Ctrl+V.

Ctrl+X also works to cut text, as does Ctrl+Z for undo, Ctrl+Y for redo, Ctrl+A to select all text and Del to delete.


Tutorial: Replacing Button Images

To change the picture displayed by the button, follow these steps:

    1. Pick the field next to the Image parameter.

    Customize Toolbars and Button Icons - 44

    Accessing the button editor

    1. Notice the ... button at the end of the field. Click it to access the Tool Image dialog box. This dialog box offers four ways to access collections of pictures (or icons)

Builtin --- lists images available within BricsCAD. Scroll through the list, choose an image and then click OK.

Customize Toolbars and Button Icons - 45

Choosing an icon from those provided by BricsCAD

Bitmap file --- selects an image on your computer:

  1. Choose the size:

    • One Image File --- standard size only (16×16 pixels)
    • Small and Large Image Files --- both standard and large (24×24 pixels).
  2. Click the ... button

  3. From the Tool Image dialog box, Chose choose a file in BMP (bitmap), GIF, JPEG, or PNG format. The image is automatically resized to fit the area of the button.

    Customize Toolbars and Button Icons - 46

    Choosing an icon from a file

  4. Click Open and then repeat for the large image, if necessary.

  5. Click OK.

Resource --- chooses an image from a resource file. These .dll or .exe files are used by Windows to run programs and often contain a small collection of icons. At time of writing this book, this option did not work and so all you can do is click Cancel.
None --- removes the image from the button. In this case, the button is blank.

Customize Toolbars and Button Icons - 48

Specifying no icon for the button

BricsCAD does not have a built-in icon editor. Instead, you can use a raster editor like PaintShop Pro to create images and then use the Bitmap File option to load them into BricsCAD.


Download BricsCAD free for 30-days

Start Using BricsCAD Today

Permanent or subscription licenses that work in all languages, in all regions.


  1. Introduction
  2. 55 Tips for BricsCAD Users
  3. Settings
  4. Changing the Environment
  5. Custom User Interface
  6. Introduction to the Customize Dialog Box
  7. Customize the Menu Bar & Context Menus
  8. Toolbars and Button Icons
  9. Writing Macros and Diesel Code
  10. Ribbon Tabs and Panels
  11. Keystroke Shortcuts, Aliases & Shell Commands
  12. Mouse, Double-click & Tablet Buttons
  13. Absolutely Everything You Need to Know About The Quad
  14. Rollover Properties
  15. Workspaces and the User Interface
  16. Designing Tool & Structure Panels
  17. Creating Simple & Complex Linetypes
  18. Patterning Hatches
  19. Decoding Shapes & Fonts
  20. Coding with Field Text
  21. Writing Scripts
  22. Programming with LISP (Introduction)
  23. LISP Functions

Explore BricsCAD

Download BricsCAD Free Trial | Sign Up For News & Updates | Shop Online For BricsCAD Desktop Software

March 19, 2024 8 min

What's New in BricsCAD® V24.2

BricsCAD® V24.2 is chock full of new and enhanced features for 2D drafting, 3D modeling, civil, survey, BIM, and mechanical workflows. With this release, the Bricsys team included several new features and improvements to help you accelerate your time to deliverable and provide you with a familiar CAD experience. So, let's dive in and explore what's new in BricsCAD V24.2!

March 10, 2024 6 min

The path to Scan to BIM automation with BricsCAD® BIM V24

The new automation tools included in BricsCAD® BIM V24 make the Scan-to-BIM process easier and more efficient! If you want fast and accurate reality capture of existing objects, these tools will be a great addition to your arsenal. We've added tools like the Point Cloud Classifier, Point Cloud Detect Rooms, Point Cloud Fit Rooms, and Normal Calculation for structured point clouds to help you create digital twins for quantity takeoff, create accurate building plans, and with facility management.

Follow us on social media