Search

2D Drafting3D ModellingBIMMechanicalApplications

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.

null

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.

    null

    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:null

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

    null

    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.

null

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

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:null

  1. null
    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.

null

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.

    null

    Appending a new toolbar

  4. Notice the Add Toolbar dialog box.

    null

    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.

    null

    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.

    null

    Finding a command in a collection

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

    null

    Choosing the Group tool

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

    null

    Newly created toolbar named "Groups"

    Notice that BricsCAD fills the Macro pane with preset parameters.

    null

  6. Click OK. Notice the new toolbar

    null

    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.

      null

      Using the Append Tool alternative

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

      null

      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.

      null

      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.

null

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.

    null

    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.

    null

    List of controls

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

    null

    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.

null

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:

null

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.

null

Setting the width of the control

ABOUT FLYOUTS

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

null

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.

    null

    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.")

    null

    Naming the new flyout

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

    null

    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.

    null

    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:

null

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.

    null

    Choosing to add a separator

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

    null

    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.

    null

    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.

    null

    Deleting a toolbar button

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

    null

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

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.

    null

    Renaming a toolbar

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

    null

    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.

null

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.

    null

    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.

  • nullRegular: 16×16 pixels
  • nullLarge: 32×32 pixels
  • nullExtra-large: 64×64 pixels

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

null


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.

    null

    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.

null

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.

    null

    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.

    null

    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.

null

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.

    null

    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.

null

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

Ralph Grabowski

by Ralph Grabowski - CAD Writer, publisher of upFront.eZine

Ralph is the publisher of the weekly 'upFront.eZine' e-newsletter on the business of CAD and the 'WorldCAD Access' blog on technology. Author of 240+ books and ebooks about computer-aided design, and producer of 220+ videos on using CAD.

September 17, 2024 3 min

Customizing Line Types in BricsCAD

Creating custom line types in BricsCAD can significantly enhance the detail and clarity of your drawings. Whether you’re working on complex engineering plans or simple layout designs, understanding how to create your own line types can give your projects a professional edge. Follow this step-by-step guide to learn how to create both simple and complex line types in BricsCAD.

September 10, 2024 3 min

BricsCAD Partner Apps for Civil and Survey Workflows

At Bricsys, we provide a solid foundation for our specialist survey and civil app developers to create specialist civil and survey tools that deliver robust and efficient workflows for BricsCAD users. Let’s see what updates and improvements our various developer partners have made to complement BricsCAD V24's civil and survey workflows.

These civil and survey applications are among multiple third-party applications supported by BricsCAD, with our developers working to improve their functionality and remain on pace with our new features introduced with every release.

September 9, 2024 4 min

Embracing Digital Transformation in the Construction Industry with Bricsys 24/7®

The construction industry continually evolves, and digital transformation is reshaping how teams manage projects, communicate, and handle project documentation. When embracing digital solutions for construction projects, a common data environment (CDE) like Bricsys 24/7 is an excellent place to start. With a significant variance in the level of digital adoption across the industry, embracing and leveraging digital tools can help firms differentiate themselves by elevating operational efficiency and improving project outcomes.

Follow us on social media