Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
MicroStation
  • Product Communities
MicroStation
[Archived] AskInga Wiki All about background colours
    • Sign In

    • -AskInga
      • +3D MicroStation
      • +AccuDraw Secrets
      • +Animation - Rendering
      • +Behind The Scenes
      • +Cells
      • -Colours
        • A collection of colour tables
        • All about background colours
        • Change background of DWG files
        • Change colour of engineering links - webtags
        • Change the default colour of a sheet model
        • Change the view window background colour with this macro
        • Compare design files graphically
        • Compare design files without level symbology
        • Extract and print colour table information
        • For the colour blind - change PopSet icons
        • Keyin to toggle background colour on a per view basis
        • Make a custom color book
        • Match any colour anywhere with the eye dropper tool
        • Selection set highlight colour
        • Set design history colours
        • Set element highlight colour when snapping
        • Taking the RED out of colour tables
        • Viewing a simple DWG file in monochrome
      • +Conversion - Translation
      • +Coordinate Input
      • +Design Settings
      • +Dimensions
      • +DWG
      • +EDG
      • +Element Manipulation
      • +Element Properties
      • +Element Selection
      • +Freeware - Shareware
      • +Interface Look And Feel
      • +Internet - E-Links - Links
      • +Keyins
      • +Levels
      • +Line Styles
      • +Models
      • +MSM Archive
      • +Other
      • +Presentations
      • +Printing - Plotting
      • +Programming - Automation
      • +Rasters - Images
      • +References
      • +Tags - Data Fields - Fields
      • +Text - Fonts - Annotation
      • +Views
      • +Windows - Interacting With
      • +Workspaces - Configuration
    • graffiti

     
     Questions about this article, topic, or product? Click here. 

    All about background colours

    Ask Inga logo

    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 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:
    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 1



    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 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:

    • Keyin CT=colour_table_name. When using this method, MicroStation writes a Type 5 (group data) element to the file. Although the colour table element contains a filename for the attached colour table, it does not make a call to that file since the colour information is stored within the Type 5 Element.

     

    • Select Settings > Color Table > Attach This will attach the selected colour table to the active design file. Again, a Type 5 Element is written to the file so that the next time the file is opened the correct colours will appear.

     

    • Select Workspace > Configuration > Colors and edit MS_DEFCTBL to the desired colour table of your choice. This method is sets the default colour table which MicroStation will use on all files except those that have an existing colour table element (Type 5). If MS_DEFCTBL isn't defined, then hard-coded internal values are used.



    Other keyins associated with colour tables are as follows:

    • If the keyin CT=$ returns the message file = NONE (default is in use), this indicates that the file is using the colour table as defined by MS_DEFCTBL.

     

    • If the keyin CT=$ returns the message user attached from dialog, this means that the colour data from the Type 5 is being displayed.

     

    • The keyin CT=[space] will unload the attached colour table.

     

    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

    • Askinga
    • Colors
    • Colours
    • Views
    • Share
    • History
    • More
    • Cancel
    • CTennyson Created by Bentley Colleague CTennyson
    • When: Thu, May 29 2008 1:30 PM
    • Inga Morozoff Last revision by Bentley Colleague Inga Morozoff
    • When: Wed, Aug 18 2010 10:42 AM
    • Revisions: 19
    • Comments: 0
    Recommended
    Related
    Communities
    • Home
    • Getting Started
    • Community Central
    • Products
    • Support
    • Secure File Upload
    • Feedback
    Support and Services
    • Home
    • Product Support
    • Downloads
    • Subscription Services Portal
    Training and Learning
    • Home
    • About Bentley Institute
    • My Learning History
    • Reference Books
    Social Media
    •    LinkedIn
    •    Facebook
    •    Twitter
    •    YouTube
    •    RSS Feed
    •    Email

    © 2023 Bentley Systems, Incorporated  |  Contact Us  |  Privacy |  Terms of Use  |  Cookies