How to define a variable using a key in


  
 Applies To 
  
 Product(s):MicroStation
 Version(s):08.05.02.27
 Environment: N\A
 Area: Configuration
 Subarea: Workspaces
 Original Author:Bentley Technical Support Group
  

Problem

Is there a way to define a variable through keyin?

Solution

Using configuration variables in key-ins

As an alternative to using the Configuration dialog box (Workspace > Configuration ), you can define a configuration variable from the Key-in window using the key-in EXPAND SET. For example, to create a configuration variable MYFILE having as its value the name of the open DGN file, key in EXPAND SET MYFILE = $(_dgnfile) ? note that there must be a space both before and after =.

You can also use configuration variables as parameters in key-ins. For example, to create a cell whose name is the name of the open DGN file (without the extension), key in $ CREATE CELL $(basename(_dgnfile)). In this example the first $ is an alias for the key-in EXPAND KEYIN. In other words, the key-in EXPAND KEYIN CREATE CELL $(basename(_d gnfile)) is equivalent. The second $ indicates what follows in  parentheses is a configuration variable.

To check the value of a configuration variable, key in EXPAND ECHO $( <(><<)>configuration_variable>) ? for example, EXPAND ECHO $(MS_DESIGNSEED).

The value is displayed in Message Center.