ENVIUI::LinkViews

This method starts the Link Views dialog, which lets you link views in pixel or geographic space.

Example

The following example code creates and populates two views with a multispectral and panchromatic image, respectively. It starts the Link Views dialog so that you can link the views in pixel or geographic space.

; Launch ENVI

e = ENVI()

 

; Get the UI object

UI = e.UI

 

; Create two views and load data

file1 = FILEPATH('qb_boulder_msi', ROOT_DIR=e.ROOT_DIR, $

   SUBDIRECTORY = ['data'])

file2 = FILEPATH('qb_boulder_pan', ROOT_DIR=e.ROOT_DIR, $

   SUBDIRECTORY = ['data'])

raster1 = e.OpenRaster(file1)

raster2 = e.OpenRaster(file2)

view1 = e.GetView()

view2 = e.CreateView()

layer1 = view1.CreateLayer(raster1)

layer2 = view2.CreateLayer(raster2)

 

; Launch the Link Views Dialog

!null = UI.LinkViews()

Syntax

Result = ENVIUI.LinkViews([, ERROR=variable])

Arguments

None

Keywords

Keywords are applied only during the initial creation of the object.

ERROR

Set this keyword to a named variable that will contain any error message issued during execution of this routine. If no error occurs, the ERROR variable will be set to a null string (''). If an error occurs and the routine is a function, then the function result will be undefined.

When this keyword is not set and an error occurs, ENVI returns to the caller and execution halts. In this case, the error message is contained within !ERROR_STATE and can be caught using IDL's CATCH routine. See IDL Help for more information on !ERROR_STATE and CATCH.

See Manage Errors for more information on error handling in ENVI programming.

Version History

ENVI 5.2

Introduced

API Version

4.2

See Also

ENVIUI