OpenDX - Documentation
Full Contents QuickStart Guide User's Guide User's Reference
Previous Page Next Page Table of Contents Partial Table of Contents Index Search

10.7 Using Data Explorer Script Commands

The Data Explorer scripting language provides commands to control the following aspects of the script environment:

Sequencer

These commands set up and control the Sequencer to display a series of frames.

File inclusion

This command lets you include other scripts in your program.

Prompts

These commands let you change the appearance of the prompt in the script environment.

The Data Explorer commands and parameters (if any) are complete scripting language statements and are usually terminated with a semicolon (;). There are additional commands that can be executed in the script environment by using the Executive module. See Executive in IBM Visualization Data Explorer User's Reference.

Sequencer

Data Explorer provides the following commands that allow you to control the Sequencer. You can use these commands in a script or by typing them to the executive.

sequence
The sequence command defines the frames that you specify in the Sequencer variables using the images supplied by a function call or expression. The following table defines the Sequencer variables:


Name Read Only Read/ Write Description
@deltaframe   * The number of steps between frames.
@endframe   * The index of the last frame.
@frame *
The index of the current frame.
@nextframe   * The index of the next frame.
@startframe   * The index of the first frame.

In the following example, the sequence command defines eleven frames for the Sequencer. These frames can be displayed using other Sequencer commands.

·
@startframe=0;
@endframe=10;
@nextframe=@startframe;
sequence displayobject(20*@frame);
·

play
This command begins execution on the frames that have been defined with the sequence command.

pause
This command stops the sequence at the current frame.

step
This command displays the next frame in the current sequence direction.

stop
This command stops the sequence display and returns to the first frame in the sequence.

forward
This command sets the forward direction of the sequence.

backward
This command sets the backward direction of the sequence.

'palindrome on' | off
The palindrome command with its parameters sets or unsets the palindrome mode. When you display frames in the palindrome mode, the current direction changes at the first or last frame in the series.

'loop on' | off
The loop command with its parameters sets or unsets the loop mode. When you display frames in the loop mode, the series of frames repeats using the settings of the forward, backward, and palindrome commands.

File Inclusion

include
The include command is used to interpose the contents of a file into the input stream being sent to Data Explorer. The file being included can contain both scripting language constructs and executive commands. This means an included file can, in turn, include other files.

There is currently a limit of 32 nested levels of inclusion, after which the include commands are ignored.

To include the file my.script, issue the following command:

include "my.script"

Prompts

@prompt and @cprompt
There are two at-sign (@) variables that you can set in the executive (or in a script) to customize the Data Explorer script prompt (@prompt) and continuation prompt (@cprompt). (The continuation prompt appears when you enter an incomplete command in the script environment. It indicates that you must complete the command before it can be acted upon.)

The default prompt and continuation prompt are dx> and > respectively.

The following example show how to set these variables. Note that this example shows the Data Explorer prompts as they would be displayed in the executive.

dx> @prompt = "DATA EXPLORER>";
DATA EXPLORER> @cprompt = "    more>";

If, after these commands, an incomplete statement was entered, Data Explorer would respond as follows:

DATA EXPLORER> a =
    more> 3 * 5;


Full Contents QuickStart Guide User's Guide User's Reference

[ OpenDX Home at IBM | OpenDX.org ]