Previous: IDV Scripting Next: Basic ISL Tags Table of contents Images Frames Unidata's Integrated Data Viewer > Miscellaneous > IDV Scripting

7.1.0 ISL Overview
A note: in this documentation required attributes are shown in bold.
ISL and XML
Before we start a couple of comments about writing the ISL. ISL files are written in XML and they need to be syntactically correct. A couple of reminders: The ISL file starts with a isl tag:
<isl debug="true">
...
ISL tags
...
</isl>
If there is a debug="true" in the isl tag then the IDV will print out processing messages.

Here is a simple isl file:

<isl>
    <image file="test.png"/>
</isl>
capture1.isl
You can run this by going:
runIDV capture1.isl
or through the File->Open menu from a running IDV.

Notice when you run this from the command line that no image is created. That is because there are no view windows. We can load in a bundle before we capture the image. Note, if you run this isl file you should have a test.xidv bundle file around.

<isl>
    <bundle file="test.xidv"/>
    <pause/>
    <image file="test.png"/>
</isl>
capture2.isl
A caveat: Right now the IDV does not gracefully handle when you have a bundle that has more than one view window.

The pause tag has the IDV wait until all displays have been created. The bundle tag loads in the specified bundle. Note, this file is relative to the directory where the IDV is running. You can provide an absolute path or even a URL as a file:

  <bundle file="/some/path/test.xidv"/>
  <bundle file="http://www.somesite.edu/test.xidv"/>
The file for the output image is also relative to where the IDV is running. The type of image that is created is determined by the file suffix. The IDV can generate gif, jpg and png. You can have multiple image tags:
<isl>
    <bundle file="test.xidv"/>
    <pause/>
    <image file="test.png"/>
    <image file="test.gif"/>
    <image file="test.jpg"/>
</isl>
multi.isl
The isl tag can have a loop and a sleep argument. The sleep argument is the number of seconds to sleep after each iteration of the loop.
<isl loop="100" sleep="600">
    <bundle file="test.xidv"/>
    <pause/>
    <image file="test.png"/>
</isl>
loop.isl
This will loop through the set of commands 100 times. After each iteration of the loop the IDV will sleep for 10 minutes (600 seconds).

Note: the above loop example will keep writing out to the same image file. We can use the macro expansion facility, described here: property, to change the file name every loop iteration:

<isl loop="100" sleep="600">
    <bundle file="test.xidv"/>
    <pause/>
    <image file="test${loopindex}.png"/>
</isl>
loop2.isl
This will write out the images test0.png, test1.png, test2.png, etc.

One can use group tags to hold a set of children tags. There can be any level of nesting. The group tag can also hold a loop and sleep attribute

<isl loop="100" sleep="600">
    <group loop="2" sleep="60">
        <image file="test.png"/>
    </group>
</isl>
nested.isl

 


Previous: IDV Scripting Next: Basic ISL Tags Table of contents Images Frames Unidata's Integrated Data Viewer > Miscellaneous > IDV Scripting