Original Article Date: February 2004
Updated: October 2005, August 2010
With many thanks to Henry van Berkel, Peter Emmen, Kees van Prooijen and Krister Surell for these macros that allow you to easily extract information from your attached color table.
Color Table to Text File (colortbl2txt.bas - 2004)Authored by Henry van Berkel and Peter Emmen from the Gemeente Tilburg, this BASIC macro allows you to select a colour table and does two things. First it will build a matrix complete with RGB values, and second, it will dump the RGB values into an external text file called RGB.TXT located in the root of your C: drive. The output file can then be edited manually by opening it in Excel or any text editor. Once your RGB edits are complete, use the next macro to upload/rebuild your colour table with the modified colors. Note: This macro will not run on MicroStation V8i.
Text File to Colour Table (txt2colortbl.mvba - 2004)Originally authored by Artur Goldweer from Bentley's TSG group in Germany, this VBA macro for MicroStation V8 sets the colors of a colour table via an ASCII file. In other words, it does the exact opposite of the macro above. First create the ASCII file c:\rgb.txt with the first macro in this article. Then edit the RGB values as desired and re-create the colour table with this VBA macro. The easiest way to run this is via the following keyin: vba run [txt2ColorTbl]modMain.txt2tbl. Of course you'll want to place the mvba in the folder pointed to by MS_VBASEARCHDIRECTORIES. Note: This macro has not been tested on MicroStation V8i.
Place Colour Table (PlaceColorTable.mvba - 2005)This last VBA macro was submitted by Krister Surell. As you can see from the graphic below, it creates/prints a colour table matrix and labels each colour with it's values from four different systems: RGB, CMY, CMYK and HSV. This VBA has been tested on MicroStation V8i and appears to run fine.
This program is supplied as is. AskInga, Bentley Systems Inc., and the author of the program assumes no liability for damages direct, indirect, or consequential, which may result from the use of this program. Use this program at your own risk.
AskInga Article #177