To Define a Named Expression
- 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.
- Open the Named Expressions dialog and in its toolbar, select New.
- In the Internal Name field, key in the name of the named expression.
- 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.
- (Optional) In the Description field, key in a description of the named expression.
- Under Keywords, select the application keyword(s) applicable to the named expression.
- Under Required Symbol Sets, add the symbol set that contain the symbols you want to use in the named expression.
- 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.
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.
- In the toolbar, select Save.
- 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 ( ).
- 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 from the context menu to insert ActiveFile.Format in the expression. Then you would key in = "DWG" so that the expression reads ActiveFileFormat = "DWG".