DADiSP Worksheet Functions > Function Categories > Query Functions > OBJECTLIST
Returns a string of the available Labbooks, Worksheets, Datasets, Series or other objects.
OBJECTLIST(type, menusel, sorted, options, "name")
type |
- |
Optional. An integer specifying the object type:
|
||||||||||||||||||||||||
menusel |
- |
Optional. An integer specifying whether the objects in the list can be selected in a custom menu:
|
||||||||||||||||||||||||
sorted |
- |
Optional. An integer specifying whether to sort the objects alphabetically:
|
||||||||||||||||||||||||
options |
- |
Optional. An integer specifying an option depending on the type of list. |
||||||||||||||||||||||||
"name" |
- |
Optional. A string representing the name of the Dataset from which to generate a list of series. Only applicable when type is 4. |
picklist("Open", "Dataset:"," " , 1, objectlist(3,0,1))
returns a dialog box with a sorted list of all available Datasets in the current Labbook. When the user selects one and clicks OK, the name of the Dataset is returned by the PICKLIST function.
menulist(objectlist(2,1,1))
returns a menu of available Worksheets. The objects can be selected from the menu, and are listed in alphabetical order.
menulist("Windows Dir", objectlist(6, 1, 1, "windows"))
Returns a menu of the files located in the windows directory sorted in alphabetical order.
dirlist = objectlist(8, 0, 1, gethome+"spl");
dir3 = strget(3, dirlist, strescape(" "));
Returns the third sub-directory in the SPL folder.
viewtext(objectlist(9, 0, 1))
Displays a sorted list of the currently loaded SPL functions.
viewtext(objectlist(10, 0, 1))
Displays a sorted list of the currently loaded macros.
viewtext(objectlist(11, 0, 1))
Displays a sorted list of the built-in functions.
Each string in the list is delimited by a CR-LF. See STRGET to obtain a specific string within the list.
If type is 8, sub-directories, an option value of 1 returns all sub-directories within the directory tree, otherwise only sub-directories at the top level are returned.
If type is 9 or 10, an option value of 1 includes hidden SPL or macros (functions or macros that begin with a leading underscore).