LocateDBs()

Summary

Attempts to locate the given files along the search path set by SetSearchPath().

Syntax

paths = LocateDBs(array names)

Argument Contents
names Array of file names without paths

Returns

An array of the same length as the input array. For each name, if the file was found in the search path, the fully-qualified path (including file name and extension) is given in the output array. If the name was not found, the output array element is set to null.

Notes

  • Although the name of this function implies that it is just for databases, in fact it is useful for locating files of any type.

Example

paths = LocateDBs({"ccstreet.cdf"})
if paths[1] != null then do
layers = GetDBLayers(paths[1])
AddLayer("my_map", "Streets", paths[1], layers[2])
end

Error Codes

Error Type Meaning
Error The input array was invalid

See Also

Function Summary
SetSearchPath() Specifies the search path used by Maptitude to locate files