Category
Function
Executes a system function.
Syntax
System(string);
Inputs
| Name | Type | Default | Description |
|---|---|---|---|
| string | string | none | shell command to be executed |
Functional Details
The System module uses the C library system() function to execute operating system commands.
If the characters %, \, or " occur in the command string, they must be escaped: the percent sign must be preceded by another percent sign; backslashes and double quotes must be preceded by a backslash.
Script Language Example
This example creates a sequence of captioned images using different isosurface values. The Format module creates a different image file name for each image. The System module executes the compress function to minimize the amount of disk space used.
electrondensity = Import("/usr/lpp/dx/samples/data/watermolecule");
electrondensity = Partition(electrondensity);
camera = AutoCamera(electrondensity,resolution=300,aspect=1,width=2.5);
macro makeiso(isoval)
{
isosurface = Isosurface(electrondensity, isoval);
caption = Format("isoval = %g", isoval);
caption = Caption(caption);
imagename = Format("iso%4.2f.rgb", isoval);
collected = Collect(caption, isosurface);
image = Render(collected, camera);
Display(image);
WriteImage(image, imagename);
command = Format("compress %s", imagename);
System(command);
}
makeiso(0.1);
makeiso(0.2);
makeiso(0.3);
makeiso(0.33);
makeiso(0.36);
makeiso(0.39);
[Data Explorer Home Page | Contact Data Explorer | Same document on Data Explorer Home Page ]