04 Apr 2014 11:31 AM |
|
Dear users,
I like starting envi from IDL command line. However, when I type "envi", the "envi classic" starts. But, I want to use the envi 5.1. Is there a way to link "envi 5.1" to the command "envi" in IDL (instead of the classic envi)?
Thanks, - NG
|
|
|
|
MariM Veteran Member
Posts:2396  
06 Apr 2014 06:50 AM |
|
You need to use the new API calls for ENVI 5.x:
IDL>e=envi()
or for batch
IDL>e=envi(/headless)
|
|
|
|
Deleted User New Member
Posts:  
07 Apr 2014 07:42 AM |
|
Thank you for your answer.
Is there also a way to stop envi from the command line without exiting or resetting IDL?
|
|
|
|
MariM Veteran Member
Posts:2396  
07 Apr 2014 09:52 AM |
|
Yes, it is the CLOSE method. Here is a small example:
; Launch the application
e = ENVI()
; Open a file
file = FILEPATH('qb_boulder_msi', ROOT_DIR=e.ROOT_DIR, $
SUBDIRECTORY = ['data'])
raster = e.OpenRaster(file)
; Display the data
view = e.GetView()
layer = view.CreateLayer(raster)
; Close the application
e.Close
|
|
|
|
Deleted User New Member
Posts:  
10 Apr 2014 01:35 PM |
|
Thank you. The example is very useful.
Best regards, - NG
|
|
|
|