You are currently reviewing an older revision of this page.
Original Article Date: Jan 21, 2004
Nearly everything you ever wanted to know about color tables and setting up the background colour. This article is applicable to all versions of MicroStation. 2004-03-31 Add a bit about AutoCAD files. 2004-06-22 Add a macro for easy changing of the view window background colour. 2004-11-08 Add a keyin for changing the background on a view by view basis. 2009-12-17 Added a section on new user preferences in MicroStation V8i
2010-02-22 Edited for clarity
V7, V8 - View Window Background: Toggling this setting: 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.
V7, V8 - Macros for quickly changing the view window background colour: Rudi Wells was kind enough to post these two macros on the V7.General discussion boards: To change the view background to white: Sub Main MbeSendCommand "MDL SILENTLOAD USERPREF" MbeSetAppVariable "USERPREF", "savePrefs.extFlags.invertBackground", 0& MbeSendCommand "MBE1 CLOSEMODAL OK" End Sub To change the view background to black: Sub Main MbeSendCommand "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: Here's a cool keyin to try: mdl keyin calculat calculator userPrefsP->extFlags.invertBackground=!userPrefsP->extFlags.invertBackground;view off 1;view on 1 Doing so will make the view background on View 1 black while the others remain white and you can see this in action here With thanks to Phil Chouinard for this tip! V7, 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 essentially 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 poking on 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:
V8 - Background Colours: The colour table attached to your design file is used by all design and sheet models, but MicroStation V8 design files have two background colours: One for the design models and one for sheet models. The default background colour for design models is black, while the default for sheet models is white. To change the background color for all design models, activate any design model and edit the background colour using Settings > Color Table as described above. Similarly, to change the background color for all sheet models, activate any sheet model and use Settings > Color Table.
For files that do not contain any sheet models: Set the variable MS_DEFAULTSHEETRGB = 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.
Note, if your file already has a sheet model, the variable will be ignored. In this case, new sheet models will inherit the background colour of the existing sheet model in the file.
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.
For files that do not contain a drawing model: Define the following variable: MS_DEFAULTDRAWINGRGB = R-value,G-value,B-value. For example, setting the variable to MS_DEFAULTDRAWINGRGB =113,255,113 will give you a green background when you create the first drawing model in the design file.
Note, if the file already has a drawing model, the variable will be ignored. In this case, new drawing models will inherit the background colour of the existing drawing model.
AskInga Article #175