Model Functions in DIAL
The model functions in DIAL open cBases, Models, and DivePlans on a DiveLine Server.
Opens a cBase, Model, or DivePlan with the DiveLine name filename (enclosed in quotation marks) from the DiveLine server, and assigns it to the Model specified in the Model special Object Variable model. A connection must be established to the DiveLine Server before the Model can be opened. If the cBase, Model, or DivePlan cannot be opened, the DIAL script ends.
Closes the specified cBase, Model, or DivePlan.
NOTES:
- The DiveLine file name must include the full DiveLine path to the file. DIAL does not use the DiveLine default search path to find the file.
- The DiverLine server caches cBase and Model data in memory to speed its delivery to users. This caching happens the first time a cBase or Model is accessed. Therefore, after rebuilding a cBase or Model, the cache should be seeded by opening the cBase, Model, or DivePlan using a DIAL script as part of the housekeeping process that runs in batch mode. This prevents the first user from experiencing delays when opening the cBase, Model, or DivePlan.
Model Example
The following example demonstrates the Model function usage.
diveline.connect("localhost", "dial_user");
diveline.set_project("myProject");
console.writeln("Opening demo_drl.mdl...");
model.open(myModel,"/cbases/demo_drl.mdl");
console.writeln("Done!");
model.close(myModel);
diveline.disconnect();