To Define a Named Expression
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 (
).

- 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".

