Need help working from home with your Bentley software? We're here to help - click here
Original Article Date: January 2004
Updated: November 2004, December 2009, August 2010
Note: All graphics in this article were created from MicroStation V8i SS2.
V7, V8 - View Window Background:Toggling Workspace > Preferences > View Windows > Black Background->White will set the view window background colour to either black or white. This setting will only have an effect if the background colour specified in the attached colour table is set to black (RGB=0,0,0). In other words, if you've set the background colour to anything other than RGB=0,0,0 the setting is redundant. This setting is found in all versions of MicroStation.
V7, V8 - Macros for changing the background colour:With thanks to Rudi Wells for providing these macros. They've been tested on V7 and V8, including V8i.
To change the view background to white:Sub MainMbeSendCommand "MDL SILENTLOAD USERPREF"MbeSetAppVariable "USERPREF", "savePrefs.extFlags.invertBackground", 0&MbeSendCommand "MBE1 CLOSEMODAL OK"End SubTo change the view background to black:Sub MainMbeSendCommand "MDL SILENTLOAD USERPREF"MbeSetAppVariable "USERPREF", "savePrefs.extFlags.invertBackground", 1&MbeSendCommand "MBE1 CLOSEMODAL OK"End Sub
V8 - Keyin to toggle view background colour on a per view basis:With thanks to Phil Chouinard for sharing this very cool keyin. Put it on a function key and it will toggle the background on View 1 from black to white and vice versa. You can see it in action here mdl keyin calculat calculator userPrefsP->extFlags.invertBackground=!userPrefsP->extFlags.invertBackground;view off 1;view on 1V7, V8 - Editing the Background Colour in a Colour Table:To control the display of element colours in MicroStation, it uses a colour table which is a palette of 255 colours numbered from 0 – 254 with colour index 255 being reserved for the background of your design.
To change this colour go to Settings > Color Table and double-click the last colour swatch that contains a little B as shown above. In the resulting dialog, adjust the colour as desired, press OK and then attach the modified colour table by selecting the Attach button. At this time MicroStation will write a Type 5 element to the design file that contains the colour information for that file.If you'd like to propagate this new background colour to all files, you'll have to save the changes to the colour table to an external file. This is done by selecting File > Save As from the Color Table dialog and entering a unique name for your new table.
Once saved, you can then attach the colour table by using one of these methods:
Other keyins associated with colour tables are as follows:
V8 - Background Colours:The default background colour for design models is black, grey for drawing models and white for sheet models. Since each model type has its own colour table, you can change the background color by simply editing the attached colour table as described above.
For files that do not contain sheet or drawing models, set these variables:
MS_DEFAULTSHEETRGB = R-value,G-value,B-value
MS_DEFAULTDRAWINGRGB = R-value,G-value,B-value
For example, MS_DEFAULTSHEETRGB =113,255,113 will give you a green background when you create the first sheet model in the design file. This colour will then be inherited by all other sheet models created in the design file.
Likewise, MS_DEFAULTDRAWINGRGB =113,255,113 will set the background of the first drawing model you create to green. If the variable is not set, MicroStation V8i will use a predefined colour of RGB=192,192, 208 (greyish blue) for the background of new drawing models. This predefined colour can not be changed.
Note, if the design file already contains sheet and/or drawing models, then these two variables will be ignored and new models will inherit the background colour of the existing model .
V8 - DWG Background Colour:You can control the background colour MicroStation uses for AutoCAD DWG files by selecting the DWG Options button prior to opening the file. This is a global setting that will be applied to all DWG files opened with MicroStation V8.
It's important to note that while you can change the background colour of a DWG file for viewing inside of MicroStation, this preference is not stored with the DWG file. Ray Bentley explains:"...it is not possible to deliver DWG file with a background color set - The color isn't stored in the file at all. The background color is a setting that goes with the AutoCAD installation (in their equivalent of a prefs file) so the same file may appear with different backgrounds on different computers."
MicroStation V8i - Background Colour User Preferences New options have been added to the View Options category of the Preferences dialog (Workspace > Preferences).
Those preferences allow you to set the color that will be used for the background of design, drawing, or sheet models.
AskInga Article #175