Configuration variable operators


AskInga logo

Original Article Date: March 25, 2004

Using things called operators we can define how MicroStation will process each configuration variable. This is just another step in the workspace learning curve.

When we work with operators we can define how MicroStation will process each configuration variable. The syntax used when defining variables is as follows:

[VARIABLE_NAME] [operator] [value] [# comment]

There are five operators available for defining the values of variables:

: Conditional Assignment
Using : tells MicroStation to assign the value to the variable only if it's not defined elsewhere. You'll see this operator being in ...\Bentley\Program\MicroStation\config\msconfig.cfg

= Unconditional Assignment
This operator assigns the value to the variable even if it was assigned something else. You can see an example of this in ...\Bentley\Workspace\Standards\standards.cfg

+ Append assignment
If you use the + as an operator, it will append the value to the variable. This operator could be useful for building a string, but should not be used for directory or file lists and is therefore not used often.

< Prepend assignment
This operator is useful for creating a list of files or folders. It will prepend the value to the beginning of a variable that defines a path. However, if the variable doesn't have a value already set, then this operator is the same as the = operator. Examples of this variable can be seen in ...\Bentley\Workspace\Projects\Examples\general.pcf.

> Append assignment
This operator functions in the same fashion as the < operator, except that the value is appended to the variable.

Regarding the prepend and append operators; when a variable is pointing to a list of files or folders, MicroStation will use the first definition if it meets the criteria. For example, you could have the following set:

MS_MACRO = c:/program files/bentley/workspace/standards/macros/

MS_MACRO > c:/program files/bentley/workspace/system/macros/

MS_MACRO > d:/production/macros/


In this case, if you were to kick off or look for a particular macro, MicroStation would search the list in the same order as displayed above. If the last line was a prepend variable, it would be bumped to the beginning of the list.

AskInga Article #197