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.
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 palatte 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 propegate 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. Similiarly, to change the background color for all sheet models, activate any sheet model and use Settings > Color Table.
For files that do not yet contain any sheet models, you can also control the default background colour that will be used for new sheet models by editing the configuration variable MS_DEFAULTSHEETRGB. For example, setting the variable to MS_DEFAULTSHEETRGB =113,255,113 will give you a lovely green background.
Note, if your file already has a sheet model when you set the above variable, it will be ignored and any new sheet models that you create will have the same background colour as the existing sheet.
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 posssible 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 - Model Background Color user preferences New options have been added to the View Options category of the Preferences dialog (Workspace > Preferences).
Those preferences allows you to set the color used as the design, drawing, or sheet model background color.
AskInga Article #175