Skip to end of metadata
Go to start of metadata

Creating an Opticks Wizard for calling an IDL routine

What You'll Learn: This document describes how to create an Opticks Wizard that will execute a pre-written IDL routine. As you'll see at the end, this allows you to create a one-click menu to execute a potentially very complicated IDL routine.

The Steps:

We execute two IDL commands from the wizard. The first one is to change the directory to where we have an IDL script file, and the second one executes the script. The script we call generally restores or compiles an IDL file, then runs it. The IDL file or script usually makes use of the ARRAY_TO_IDL or other such functions to accomplish the task at hand.
You can use any number of commands from the wizard, this two step wizard is how we chose to utilize it.

1) From Opticks , select the 'Tools->Wizard Builder...' menu item.

The Wizard builder should open:



2) Scroll down the Select Plug-In list until you find a Plug-In named, 'IDL', highlight it and drag it over to the wizard window:

3) A Box with 'IDL' under should be created, move it to a central location of the wizard builder

4) Scroll down the 'Type' list and select 'string':

5) Drag the "string" icon to wizard builder:

Under 'Name', type a title for the Value such as 'cd'
Under 'Value', type the IDL command you wish to execute, such as:
cd, "c:\tmp\"

Select the 'OK' button
6) A Box with 'Value - command' under it should be created, move it next to the IDL box created earlier.

7) Middle click on the green circle in the 'Value - Command' box, hold the middle mouse button down and drag it to the
green circle on the left side of the IDL box and release.

This should create a green line that connects the 'Value - Command' input box, with the 'IDL' plugin box.
8) Now left click and hold the left mouse button to drag a box around the 'Value - command' and 'IDL' boxes.
The boxes and the line should all be selected
9) Now copy the boxes with a Ctrl-C.
10) Now paste the boxes with a Ctrl-V

11) Left click and hold the left mouse button on the selected boxes and drag them below the original boxes.
12) Double click on the new 'Value-command' box.
The Wizard Value Item box should open for the new 'Value - command' box.
13) Type in a new command in the Value: field, such as '@plot.txt' to execute all of the IDL commands in
c:\tmp\plot.txt which has one line:
plot,[0,1],title='Test plot'

14) Type in a name for the wizard in the 'Wizard Name' field on the far right.
15) Type in a menu location the wizard should display in, in the 'Menu Location' field. Menu's can be represented with brackets and a slash, such as:
[IDL Functions]\script
16) Save the wizard from the file menu
17) Select the 'Execute' button on the far right of the wizard builder to execute the wizard.


18) Select Tools->Update Wizard List from Opticks.

A new menu should be created, called 'IDL Functions', it should have one item, 'plot'.
19) Select the new menu item to run the IDL script again.

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.