MicroStation CONNECT Edition Help

To Define a Named Expression

  1. Open the DGN library in which you want to store the named expression. If the named expression will control the disabling or hiding of a custom user interface component, such as a menu item, task, or tool, open the DGN library in which the custom user interface component is or will be defined.
  2. Open the Named Expressions dialog and in its toolbar, select New.




  3. In the Internal Name field, key in the name of the named expression.
  4. In the External Name field, key in the string that will appear in the user interface to describe the test that will be applied in the evaluation of the named expression.
  5. (Optional) In the Description field, key in a description of the named expression.
  6. Under Keywords, select the application keyword(s) applicable to the named expression.
  7. Under Required Symbol Sets, add the symbol set that contain the symbols you want to use in the named expression.
  8. In the Expression field, create the expression. To specify a string or numeric value, key it in. To specify a symbol, right-click in the field and select a value or method from the context submenu for the symbol set of which the symbol is a member.
  9. Click Test.

    The named expression is evaluated, and the result appears in the field adjacent to the Test button. If the test is successful, continue to step 10. Otherwise, return to step 7 or 8 to make corrections.

    At this point the named expression is defined but it has not yet been saved. Its name therefore appears in blue.

  10. In the toolbar, select Save.
For example, assume you have opened a DGN library and are defining a right-click context menu item that will be visible only while the open file is in DWG format. Before or during the tool definition process, you would need to define a named expression to test the format of the open file by following the above procedure. Specifically:
  • In step 4, you would key in Open File is DWG.
  • In step 6, you would select the User Interface keyword. This will cause your label, "Open File is DWG," to appear as a Show/Hide Test option for specifying the menu item context in the Customize dialog ( File > Settings > Configuration > Customize ).


  • In step 7, you would add the symbol set ActiveFile to Required Symbol Sets.
  • In step 8, you would right-click in the Expression field and choose Active File > Format from the context menu to insert ActiveFile.Format in the expression. Then you would key in = "DWG" so that the expression reads ActiveFileFormat = "DWG".