How to Create new Custom Button for Space Types


In order to use required settings for shapes, we should create Element templates for each Space type.

  1. Select on Element Templates Drop-down and select to manage all


  2. In opened Element Templates Dialog create new group and then new templates required for new Space types

When Templates are ready with all required coloring and line-styling we need to prepare our Icons for those buttons. This is not required, because Buttons can be created using default Icons and user still will be able to see the icon label when he will hover over it with mouse cursor.

In below instruction you will find way of how to prepare new icons for new custom buttons.

  1. Go to users perfs directory and open Personal.dgnlib file
    C:\Users\Tester\AppData\Local\Bentley\MicroStation\10.0.0\prefs


  2. When File is opened type in Customize in search and select it to open Customization dialog


  3. In Opened dialog select on icons section and Import your icons


  4. I have tested with *.ico and *.bmp files bth types were imported fine.


Now when *.dgnlib file is prepared with required icons we can continue on next part where we will create Custom Icon group and buttons.

  1. In same Customize dialog select Utilities > Customize Ribbon option


    The Customize Ribbon dialog opens.


  2. In the list below "Customize the Ribbon", navigate to the desired workflow, tab, and add new group Space Types in which new buttons for different Space types will be added.


  3. In newly added group Space Types, add new buttons.


  4. In the Properties section, set Label, Description and the Key-in field


    In Key-in field enter value that will set required Element Template and will select to use Smartline tool to draw new Shapes. Below are Key-ins which will be required for such combined Key-in operation.

    lock templateassociation onKey-In to set the Active Element template 
    template active SpaceTypes\BLDKey-In to set the Element template Association with BLD template on SpaceTypes group
    place smartlineKey-In to set Smartline tool

    Key-Ins can be combined using semicolon separator and used for required custom button


    lock templateassociation on
    ;template active SpaceTypes\BLD
    ;place smartline

  5. Now to change the icon, in the Icon field, click the Browse button on the right-side, select to look for icons in Current Design File and choose required one.


  6. Rest options we will leave as it is, but there are additional button drop-down or its visibility options, which are described in this help article:
    https://docs.bentley.com/LiveContent/web/MicroStation%20Help-v15/en/GUID-447DAAED-2385-4300-BD4A-C84DACACD277.html

  7. Apply all changes and close dialog.

Now test new Buttons and verify