Original Article Date: March 29, 2004
For new CAD Administrators...everything you always wanted to know about configuration variables. Well, maybe not, but it's a good start. 2007-02-09 Added a note regarding the carriage return issue.
Note: The content of this article is designed for the CAD Administrator or the user who is in charge of MicroStation's configuration. If this does not apply to you, then it is strongly advised that you do not make changes to MicroStation's configuration without the proper knowledge and permission. Failure to do so may cause inadvertent changes to the configuration that may cause MicroStation to fail upon launch. Thank you. What are these things called configuration variables? A configuration variable is a storage item that contains data which can change during the execution (launch) of MicroStation and is defined by the following syntax: [VARIABLE_NAME] [operator] [value] [# comment] For example: MS_CELLLIST = d:/Production/Cells/ Where MS_CELLLIST is the variable_name = is the operator d:/Production/Cells/ is the value. Are there different kinds of variables? Sure thing....MicroStation access and uses a variety of variables, additionally, MicroStation and other programs may also access environment variables in your are set at the operating system level. Where are the variables set? MicroStation's variables are set via a number of cascading configuration files which are loaded in a very specific order when you launch MicroStation. Inside of each of these configuration files, you'll find dozens of variables directing MicroStation on where to look for specific files, specific folders and specific settings. How can I view my variables? There are a number of ways to view and determine what your configuration variables are including just opening any configuration file with a text based editor. A simple example is the following snippet from a delivered project configuration file:
Ok, I've just looked at some of the variables and see some wierd syntax like <> and = . What's with that? What you're seeing are things called configuration variable operators which define how MicroStation will process each variable. Are those different than the %if and %endif things I see in msconfig.cfg? Yep, those are preprocessor directives for processing the configuration files. I've also seen something that looks like this: $(variable_name) and ${variable_name}. What are those? Those are directives that allow you to refer to other pre-defined variables. Using this method can eliminate the need for creating new and possibly redundant variables and can also streamline how MicroStatio resolves variables. Why are configuration variables in CAPS? Although it's not a requirement, it allows the reader to view and locate them easier within the configuration files. Why do some start with MS and others with _USTN? The variables that start with MS will be seen in the dialog when you go Workspace > Configuration while the ones that start with an underscore ie: _USTN won't....well, by default anyway. Sounds fishy. Can I do something so that I can see the _USTN ones? Sure thing, just set this variable _USTN_DISPLAYALLCFGVARS = 1. Wow! is there anything else you can share? Yeah, to finish this article off, here's a little list of pointers to keep in mind:
AskInga Article #200