Custom Space Labels in Bentley Architecture

Playing with vba leads to a better way to label spaces:

Newly updated to version 1.6!  Now supports Metric working units.  See below:

After helping a client with a custom datagroup annotation cell that used VBA to format the datagroup data, I decided to see how I could use VBA to create an Advanced Space Label for Bentley Architecture spaces.  I ended up with a space label that does the following:

  • With Space Label 1, that ship with Bentley Architecture, you are limited to 32 characters for your space name in the label field.  In Space Label 2, you have 2 lines of 32 characters.  In the Advanced Space Label, if the label field exceeds 16 characters, it automatically splits the text into separate lines (as many as 3 lines) and your actual space label can be up to 256 characters long. (This is the limit in the Bentley Architecture space dialog.)  

                Comparison of Space Label 1 and the Advanced Space Label

  • The Advanced Space Label utilizes the Label2 field as an abbrieviation field.  If any text is present in the label2 datagroup field (like an abbrieviated space name), it will be placed in the space label, but you can still display the Label field (the full space name) on your Space Schedules.             

                  Demonstatration of the Abbreviation function in the Advanced Space Label

  • It formats the display units for the area calculations and does not rely on the settings in the Architecture user preferences.

                         Comparison of Space Label 1 and the Advanced Space Label

  • It calculates and displays the volume of the space (based on the actual area x the ceiling height.) 
  • It displays the ceiling height.  (Your Mechanical and Electrical engineers will love this.)

You can download the 1.6 of the vba and the label cell here:

 Advanced Space Label version 1.6

Version 1.4:

  • You can now control the separation of your long label into separate lines.  Just put your long space label in the label2 field and insert a tilde ~ symbol instead of a space where you want a line break.  (Because there are only 3 lines possible, only the first 2 tilde symbols will cause line breaks; any additional tildes will be displayed.
  • The Ceiling Height field is now formatted to match the typical US display of feet and inches.  (i.e. CLG: 9'-3") The label will support fractions in increments of 1/8".  (This was added to deal with the issue where Bentley Architecture displays all ceiling heights with non-zero inches with 2 decimal places. i.e.  9'-3.00"


To install the Advanced Space Label:

First install the DG_Annotation.mvba
  • Place the DG_Annotation.mvba in a folder that is listed in the configuration variable: MS_VBASEARCHDIRECTORIES
  • For a default install of Bentley Architecture, you can put it in:
  • XM: C:\Documents and Settings\All Users\Application Data\Bentley\WorkSpace\TriForma\vba
  • v8i: C:\Documents and Settings\All Users\Application Data\Bentley\MicroStation\WorkSpace\TriForma\vba
  • The vba will load automatically when you use the Advanced Space label cell.
Next install the Advanced Space Label Cell:


  • Use the "Manage Datagroup Annotation Cells" tool to open the BB_annotation cell library.
    • In XM: It is in the Sheets and Annotation Category of the Architecture task set
    • In v8i: It is in the Reference Symbols Category of the Views and Sheets task set
  • With the cell library open, open the Models dialog
  • Choose the Import Models tool in the dialog's toolbar
  • Navigate to the Advanced_Space_Label.cel cell library that was included in this download.
  • Select the model named "Advanced Space Label" and press OK.
  • Close the "Manage Datagroup Annotation Cells" tool
  • Open the "Annotation Tool Settings" tool.
  • Expand the Datagroup Annotation in the list on the left-hand side of the dialog.
  • Select the Space category.
  • In the first line of the right-hand list of the dialog, click on the name of the cell in the Cell column.
  • In the dialog that opens, select the Advanced Space Label. (you may need to restart XM in order to see the Advanced Space Label in the list)
You are now ready to use the Advanced Space Label.
  • In XM, you can either place a new space or use the update space tool on an existing space to see the new label.
  •  In v8i, the next time you create a Floor Plan dynamic view of a file with spaces, you will see the new label. If you are using extractions, you will need to use the Datagroup Annotation tool to place the space labels in the model first.


Please let me know what you think of the new label.  If you have any suggested improvements or modifcations, leave a comment and I will see if I can do it.

(and don't forget to rate this Blog post.  Use the stars at the top of the page!)

I will also have a future post that goes into detail about how the Advanced Space Label was created.


  • Noel:

    Downloaded the cell and vba, and the vba is loaded and the cell defined as the DG annotation cell to use.  It will label with the new cell, but it will not wrap the space label1 field past the 16 characters for me.  Is there another step?  Wrapping text in a label has been a long standing request not just for the space label.  I would really like to see this working.



  • Noel:

    This is great!  One possible addition to this would be to add a field for dividing the area by occupant density (occupants/sq. area).  This would obviously require the density property be added to the space definition, but providing the option would be nice.

    Great job!