Supporting Techniques - Making Configuration Files Legible in Notepad++

Updated June 2021

Revised XML files are linked below that contain current keyword lists for MicroStation and OpenBuildings Designer.

Notepad++ is one of the best text editors around and the one I always use for editing configuration files.

However out of the box it understandably does not include the Bentley CFG file language so all text is the default colour.

I recommend setting the Notepad++ Setting menu > Preferences > Tab Settings > Tab Size to 8 for best presentation of tab spacing.

To transform your configuration files into this feast of colour, simply setting all the commented out content to green makes an immediate difference to legibility:

The eagle eyed may spot that that the screen grab above is from msconfig.cfg; which presents another opportunity to say that this file is look but don't touch. Never edit this file!

Try any of these language files:

White Background (Out of date, no longer maintained)

Yellow Background This version has a parchment background colour that I found more restful on my eyes than white. (Slightly out of date, no longer maintained)
Set the Notepad++ default background RGB to 250:228:146 in Settings > Style Configurator > Global Styles > Default Styles for maximum restfulness.

NEW*  Notepad++ Bentley CFG Language file Dark Mode  

Import this language file into Notepad++ for use with its Dark Mode:

Use the Language menu > Define your language... dialog (which can be docked) to import one or both of the linked xml files, it should appear on the user Language pop-down as 'Bentley CFG 2'.
Once Notepad++ is restarted it will then appear at the foot of the languages menu.

Consult the Notepad++ documentation for further information on languages if needed.

The colour coding provided is a pretty consistent cue to the various types of variables and operators populating these files. The formatting is as follows:

  • Green/Courier New for comments
    White on Orange for Configuration Level statements

    Note that Comments can be folded by clicking the +/- icons to the left.

  • Red for 'expand when used' variables $( )
  • White on Blue background for 'expand current value' variables ${ }
  • Blue for operators
  • Pink for %if statements

    Folding is applied to %if statements.
  • Purple bold italic for any company specific variables (listed in Keywords List 5th Group. It is easy to add your own if needed.
  • Black Italic on Red for variables listed as removed in later versions. This indication is advisory, any decisions to remove variables must be made in conjunction with the appropriate documentation or advice.
  • Teal bold for OpenBuildings Designer variables:

Export the coloured text:

The NppExport plug-in enables file contents to be exported with all colours to RTF:

This is helpful when documenting your configurations:

(If you use the yellow background version of the xml, the pasted RTF will be highlighted in yellow, but that's easy to change after pasting.)

Keyword lists

Much of the fomatting above is provided by keyword lists. These lists will be updated periodically but are not comprehensive and do not cover all Bentley products based on the MicroStation platform. They are not linked to any Bentley products so there will inevitably be omissions from existing and future variables as products develop.

The keyword lists provide additional benefits:

If a listed variable is mistyped it will not receive the expected formatting, as shown by the omission of an '_' character in the list below:

Note that a limitation that I have found with the keywords, is if configuration statements are written without spaces between the variable and operator, e.g.: 

MS_DISALLOWFULLREFPATH= 0

Notepad++ will (obviously really) treat the '=' as part of the word and will not apply formatting.

The Notepad++ pop-up spelling lists are pre-populated by the keywords which is helpful for spell checking.

Parents
  • NPP_BentleyCfg_DarkMode_Civil_ProjectWise_Update.xmlNPP_BentleyCfg_DarkMode_Civil_ProjectWise_Update_Example.cfg

    I wanted to share my own dark mode version of the Bentley cfg npp udl file as a way of saying "thanks" to the community. Your posts have undeniably made me a better CADD/design admin. Attached is my version of the npp udl and an acompanying cfg example to view. 

    My changes are targeted to the Civil platform or ProjectWise admin that would like to see those variables stand out more in their configuration files.

    1. Changed Universal Styles
      1. Default text - Dark gray
      2. Conditionals - Light orange
      3. Operators - Light blue
        1. I've moved the basic math operators to the "Operators 1" group. This removes the space requirement for variable definition. 
        2. I've included Projectwise path/workarea operators
      4. Comments - Dark green
      5. Numbers - Yellow
      6. Parenthesis - Red
      7. Brackets - White on blue background
    2. Keywords 
      1. 1st Group (Configuration Level definitions) - White on orange background
      2. 2nd Group (Bentley System level variables) - Magenta
      3. 3rd Group (MicroStation variables) - Light purple
      4. 4th Group (OpenBuildings and OpenPlant variables) - White 
      5. 5th Group - (Custom/Client-Specific) - White on purple background
      6. 6th Group - (OpenBridge, ProStructures, OpenRail, OpenRoads variables) - Orange
      7. 7th Group - (Environmental or deprecated variables) - White on red
      8. 8th Group - (ProjectWise and ProjectWise Dynamic Workspace variables) - Cyan

Comment
  • NPP_BentleyCfg_DarkMode_Civil_ProjectWise_Update.xmlNPP_BentleyCfg_DarkMode_Civil_ProjectWise_Update_Example.cfg

    I wanted to share my own dark mode version of the Bentley cfg npp udl file as a way of saying "thanks" to the community. Your posts have undeniably made me a better CADD/design admin. Attached is my version of the npp udl and an acompanying cfg example to view. 

    My changes are targeted to the Civil platform or ProjectWise admin that would like to see those variables stand out more in their configuration files.

    1. Changed Universal Styles
      1. Default text - Dark gray
      2. Conditionals - Light orange
      3. Operators - Light blue
        1. I've moved the basic math operators to the "Operators 1" group. This removes the space requirement for variable definition. 
        2. I've included Projectwise path/workarea operators
      4. Comments - Dark green
      5. Numbers - Yellow
      6. Parenthesis - Red
      7. Brackets - White on blue background
    2. Keywords 
      1. 1st Group (Configuration Level definitions) - White on orange background
      2. 2nd Group (Bentley System level variables) - Magenta
      3. 3rd Group (MicroStation variables) - Light purple
      4. 4th Group (OpenBuildings and OpenPlant variables) - White 
      5. 5th Group - (Custom/Client-Specific) - White on purple background
      6. 6th Group - (OpenBridge, ProStructures, OpenRail, OpenRoads variables) - Orange
      7. 7th Group - (Environmental or deprecated variables) - White on red
      8. 8th Group - (ProjectWise and ProjectWise Dynamic Workspace variables) - Cyan

Children
No Data