X

Help Articles are product support tips and information straight from the NV5 Geospatial Technical Support team developed to help you use our products to their fullest potential.



3771 Rate this article:
No rating

ENVI Classic doesn't seem to recognize my additions to the menu

Topic:

I've added a new item to my envi.men menu definition file. It looks correct, but I've restarted ENVI Classic and I don't see the changes I made. What happened?


Discussion:


One of the strengths of ENVI Classic is it's flexible nature. You can add your own tools and menu items easily with your own IDL code, or programs from other users. A typical section of the ENVI menu definition file, envi.men found in the \Exelis\ENVI50\classic\menu directory, might read as follows:


0 {File}
1 {Open Image File} {open envi file} {envi_menu_event}
1 {Open External File}
2 {Landsat}
3 {Fast} {open eosat tm} {envi_menu_event}
3 {GeoTIFF} {open tiff} {envi_menu_event}


The envi.men file is an ASCII text file, readable in any editor. Each line defines a button on the interface. The number defines what "level" of drop down the button will occupy (i.e. which sub-menu). The first set of braces { } contains the text to be on the button. The second set of braces contains a "user value", which can optionally be used in the code called by the button. The third set of braces contains the name of the program to be run by the button. For details on customizing ENVI, see our Help Article
How To Add A User Function To Classic ENVI.

A popular place to add buttons to the user interface in ENVI Classic is at the end of the envi.men file, so that added functions are in their own section at the end of the menu. This might look like the following example:


0 {Help}
1 {Start ENVI Online Help} {envi help} {envi_menu_event}
1 {Mouse Button Descriptions} {mouse descriptions} {envi_menu_event}
1 {What's New in ENVI 3.5} {envi whats new} {envi_menu_event} {separator}
1 {About ENVI} {about envi} {envi_menu_event}
0 {User Functions}
1 {My Added Function} {unused} {my_program_name}


ENVI must be restarted for changes to the menu file to take effect. Sometimes, when such a line is added and ENVI is restarted, the button in this example "My Added Function" might not appear. The usual reason for this is that some installations of ENVI (usually depending on the operating system) may require a carriage return after the end of the last line. The solution is to open the envi.men file in a text editor, position the cursor at the end of the last line and hit Enter. Be sure to resave the file to add the change. Restarting ENVI should now add the new button to the interface.


Additionally, the other text-based definition files in ENVI may show a similar carriage return requirement. These files include map_proj.txt, ellipse.txt, display.men, datum.txt and others. If customizing any such files fails to introduce your changes, be sure to check that there is a final carriage return (Enter) after your entry.
Please login or register to post comments.
Featured

End-of-Life Policy Enforcement for ENVI 5.3 / IDL 8.5 and Earlier Versions

5/6/2024

April 1, 2024 Dear ENVI/IDL Customer,  We are reaching out to notify you of our supported... more »

How to Upgrade licenses to ENVI 6.x / IDL 9.x

12/5/2023

What is the new Upgrade function? Starting with ENVI 6.0 and IDL 9.0, we have implemented an... more »

What to do if the 'License Administrator - License Server' for the Next-Generation License Server does not start?

6/13/2023

Background: With the release of ENVI 5.7 & IDL 8.9 and the corresponding Next-Generation licensing... more »

Next-Generation Licensing FAQ

4/28/2023

  NV5 Geospatial has adopted a new licensing technology for all future releases of our ENVI, IDL... more »

The IDL Virtual Machine

6/6/2013

What is the IDL Virtual Machine? An IDL Virtual Machine is a runtime version of IDL that can... more »