Lava
Use the Lava option to run an existing script file.
Lava is a module for the version of the popular scripting language "Perl" that is built into Vulcan. This version of Perl behaves exactly like standard Perl5, except that certain functions, which can directly access Vulcan internals, have been added. The syntax required to access these functions is provided through the Lava package.
It is also possible to add (and therefore run) Lava scripts from toolbars. For more information refer to Tools > Customise. You can also specify, in the project file (.dg1
), a Lava script to be run automatically when Vulcan is started.
The Lava option also runs Clava (encrypted Lava) scripts. Clava scripts are a binary version of Lava scripts and have been encrypted so that no changes can be made to these scripts except by Maptek.
Perl has become a very popular language, and there is a large amount of reference material and many publications devoted to the topic. Programmers wishing to use Lava should first familiarise themselves with Perl through one of the many books on the topic (e.g. Programming Perl by Larry Wall, Tom Christiansen, and Randal L. Schwartz). An excellent source of reference material can be found on the Perl Web Page.
The current version of Lava is 1.1, this is still in development. Many changes are expected, but almost all of these changes will be extensions to the functionality or modifications to the internals, so the current interface should remain supported. However, as with almost all software products, Lava may quickly evolve in response to user demands requiring some tolerance to the possibility of the language changing.
Lava scripts are written as text files and can be edited with your favourite editor. To make use of the additional functionality provided by Lava, the directive "use Lava;" or "use vulcan;" should appear at the top of your file.
If you wish to use additional Perl modules that you have installed into your local version of Perl, you may need to direct Perl to the additional include files using something like:
BEGIN { unshift(@INC,"/usr/local/bin/Perl/lib"); } use Module A
For additional information on Lava see the Lava Programming documentation.
Instructions
On the File menu, click on Lava to display the Enter script to run panel.
Script name
Select or enter the name of the script. The full name of the script file is <name>.lava
or <name>.clava
. Script files may be located in the Vulcan/bin/lava
directory or a directory pointed to by the VULCAN_LAVA
environment variable.
Client directory
A directory pointed to by the CLIENT_LAVA
environment variable.
Home directory
A directory pointed to by the HOME
environment variable.
Current (working) directory
Scripts located in the current directory can also be run from the Vulcan Explorer.
The system will look for scripts in that order.
To run a script named TEST
, the system will look first in the VULCAN/bin/lava
directory, if it is there the system will use that script, if it is not, the system will look in the client directory, then the home directory and then the current directory.
Use the home directory for personal scripts, the current directory for project related scripts, and the client directory for company/department wide scripts. Scripts in the VULCAN/bin/lava
directory are usually scripts that are supplied by Maptek and should not be modified, even in they are Lava scripts as opposed to Clava scripts. Refer to the ReadMe.txt, which is also located in the VULCAN/bin/lava
directory, for information on the available scripts.
Click OK.
Related topics