List

Lists objects in the current project in the Script window.

Contents

Syntax

list option [name]

Notes:

 

Options

Option What Gets Listed Wild Card Supported
No option Open the LabTalk Variables and Functions dialog.
See also: Edit command.
@ All registry-stored persistent system variables Yes
a All session variables Yes
aa String arrays (session) (8.1 SR0) Yes
ac Constants (session) (8.1 SR0) Yes
af Local Function (session) (8.1 SR0) Yes
afc Local Function Full Content (session) (8.1 SR0) Yes
afp Local Function Prototype (session) (8.1 SR0) Yes
ag Graphic objects (session) (8.1 SR0) Yes
ar Range variables (session) (8.1 SR0) Yes
as String variables (session) (8.1 SR0) Yes
at Tree variables (session) (8.1 SR0) Yes
av Numeric variables (session) (8.1 SR0) Yes
c All LabTalk commands
cf All Origin C function prototypes accessible from LabTalk
cfn Origin C function prototypes that return numeric
cfo Origin C function prototypes that return void
cfs Origin C function prototypes that return string
cfv Origin C function prototypes that return vector
eg List all embeded graphs in active worksheet
f All Origin C functions accessible from LabTalk
ff All fitting functions Yes
fn Origin C functions that return numeric
fo Origin C functions that return void
fs Origin C functions that return string
fv Origin C functions that return vector
lg The GetN tree of the last executed X-Function
macro All macros
o All objects and labels in the current layer
op List all operations
opi List all operations whose input is in active sheet
opo List all operations whose output is in active sheet
opp List all pending operations
rc Total number of data ranges in the opened project
rng List all project ranges, for example could be generated by analysis operation or import. Could use doc.rangescount( ) method to output the number only.
rrvs List all the dataplots using virtual datasets
s All project datasets (previously known as series)
sl All loose datasets
so All orphaned datasets
soc Count of orphaned datasets
sr All the same (duplicated) datasets (9.0 SR0)
st All project datasets with storage
svr All persistent system variables in Origin
v All numeric variables (does not include dataset)
vs All String variables
vt All Tree variables
xf All X-Functions

 

Examples and Notes

Examples and notes on the use of the list command are broken down by command option.

@; List all registry-stored persistent system variables

Syntax: list a

DO NOT precede the switch with a dash(-) character. When used by itself, as in ...

list @;

... ALL persistent variables stored at HKEY_CURRENT_USER\SOFTWARE\OriginLab\SysVar will be listed. To filter the list of persistent variables use letters in combination with the asterisk (*) wildcard character, as in the following examples:

list @A*  // lists all persistent sys vars at HKEY_CURRENT_USER\SOFTWARE\OriginLab\SysVar that begin with the letter "A"

See the delete @ command and also see list -svr, below.

a; List all session variables

Syntax: list a
As of 8.1 SR0, an optional argument [name] is supported to find specific variables. For example:

list -as str*;

eg; List all embeded graphs in active worksheet

Syntax: list eg

f; List the Origin C functions that can be called from LabTalk

Syntax: list f

Note: The @OC system variable affects this option for the list command. Its default value is 1, which allows Origin C functions to be called. Setting its value to 0 turns off the ability to call Origin C functions.

ff; List all fitting functions

Syntax: list ff [<wildCardName>]

If wildCardName is not specified, all fitting functions are listed. If wildCardName is specified, the output is limited to those functions whose names include the wild card string. For example:

list ff Gauss*;

lg; List the GetN tree of the last executed X-Function

This command returns the GetN tree of the last executed X-Function:

//Active worksheet and fill some data in column A
colsplit irng:=col(A) nrows:=3;
list -lg; // The colsplit X-Funtion's GUI tree will be listed

o; List all objects and labels in the current layer

Syntax: list o

This command returns three attributes of the objects in the active graph window layer:

  1. index
  2. type
  3. name

The types are as follows:

Type=0 text object
Type=1 rect/circle
Type=2 line/arrow
Type=3 polygon/polyline
Type=7 data plot style holder

An asterisk character (*) appearing next to the value Type in the output indicates the style holder is in use. For example, enter the command:

list o;  // First make a graph the active window by selecting it.

And see output similar to the following:

1 0 YL, 0x0cfd2bd0
2 0 XB, 0x0d02eff0
3 3 __BCO2, 0x0d02f108
4 0 Legend, 0x0cb78fd8
5 7* _202, 0x0cfb90f0

op UID; list operations in the whole project

Syntax: list op [UID]

List all analysis operations in the project, or the operations specified with UID.

list op 812; //812 is UID

opi/opo; list operations whose input/output is in active sheet

Syntax: list opi/opo

List operations related to active worksheet:

list opi;  // list operations with UID whose input is in active sheet
list opo;  // list operations with UID whose output is in active sheet
1:ClassName: XFOperation(rnormalize), UID = 803, GUID = , duration=0
  Input:
    <DataRange> UID = 804     Plots:     0
        (0) X: [Book1]Sheet1!A       c1 = 0, c2 = 0  r1 = 0  r2 = -1
        (1) S: <empty>      c1 = -1000000001, c2 = -1000000001  r1 = -1000000001  r2 = -1000000001
  Output:
    <DataRange> UID = 805     Locked: 00000000000000000000000000000000   Plots:     0
        (0) X: [Book1]Sheet1!C"Normalized1"   c1 = 2, c2 = 2  r1 = 0  r2 = -1
        (1) S: <empty>      c1 = -1000000001, c2 = -1000000001  r1 = -1000000001  r2 = -1000000001

The UID number obtained here can be used to open Change Parameters' dialog for the corresponding tool using run -auc UID. Eg:

run -auc 803; // Open Normalize Columns dialog

rc; total number of data ranges in the opened project

Syntax: list -rc

list -rc;  // total number of data ranges in the opened project

rrvs L/P/D<more options>; list all the dataplots using virtual datasets

Syntax: list -rrvs L<more options>
To list all the data plots in the active graph layer that use virtual datasets

Syntax: list -rrvs P<more options>
To list all the data plots in the active graph window that use virtual datasets

Syntax: list -rrvs D<more options>
To list all the data plots in the entire project that use virtual datasets

<more options> determines how to dump virtual data information. The following two letters are possible:

R dumps range info (including UID) if the range can be found
N dumps range info (including UID) if the range cannot be found


For example, to dump all the data plots in the project that use virtual datasets, regardless of whether the corresponding range can be found, use:

list -rrvs DRN;

The output would be something like:

Page: Graph1
        Frame Index = 1
(1):   bPlotType = 103    UID = 0       op = 0x0C53E298
        ->s                = 02B35FA4  VM1
        Virtual Series uid = 1340     Range = 12CC9EC8
        ->dependent        = NULL
        ->pXdependent      = NULL
        ->pDrawData        = NULL
Page: Graph2
        Frame Index = 1
(1):   bPlotType = 103    UID = 0       op = 0x0C53EEA0
        ->s                = 02B360C4  VM2
        Virtual Series uid = 1346     Range = 12CC9BA8
        ->dependent        = NULL
        ->pXdependent      = NULL
        ->pDrawData        = NULL

s; List all datasets (previously known as series)

Syntax: list s

sl; List all loose datasets

Syntax: list sl

See Datasets for information on loose datasets. Also, see list so.

so; List all orphaned datasets

Syntax: list so

This option exists to clean up "orphaned" datasets, possibly created in older versions of Origin. Orphaned datasets can be created in a couple of ways. Typically, they are left-over datasets created for internal use but which, for some reason, failed to be deleted when the associated object or process that was using it, was destroyed.

Note: The so option will also return loose datasets created without declaration (e.g. temp = {1,2,3,4,5}).

soc; dump count of orphaned datasets

Syntax: list soc [var]

...where [var] is an optional variable for holding the count of orphaned datasets.

list soc v1; // put count of orphaned datasets to variable v1.

st; List all datasets with storage

Syntax: list st

Origin datasets (worksheet columns, matrix objects, etc.), like other Origin objects, can store metadata. Use this list command switch to return the name and UID of storage-containing datasets.

Note: In rare instances, this has allowed creation of a bloated project file whose file size is disproportionately large compared to the project's visible data, causing problems of opening, working with and saving of the project file. Use the -st switch to check for the presence of datasets with associated storage.

If you find datasets with storage, you can further examine to see what the storage object may hold. Open the Script Window or Command Window and enter the name of dataset, prefixing that dataset name with...

dataset.

... and appending

.info.

As for example...

dataset.Book1_B.info.=;

At this point, you may find a named object that looks suspect and you could delete the problem object using something like...

dataset.Book1_B.info.Remove(SYSTEM)

... where SYSTEM is the name of the suspect object.


See also, Accessing Dataset Storage

svr; List all persistent system variables in Origin

Syntax: list svr

This is a comprehensive list of persistent system variables, including those whose values have been modified by the user and thus, stored in the registry. See the introductory note at LabTalk System Variable List for more information.

v; List all numeric variables

Syntax: list v

Output is in the form Index VariableName Type Value.

The third column displayed indicates the type of the variable:

Type=1 set in the current Origin session
Type=2 SYSVAR variable defined in the file (in the user folder) assigned by [Document] section in Origin.INI file
Type=3 reserved LabTalk variables
Type=5 set by configuration file

For example:

list v;   // List all numeric variables in the Script Window

Project:
1 X 3 10
2 Y 3 7
3 FITNPTS 5 60

For another way to view LabTalk variables, see also the variable editor, Language Reference: Object Reference: Alphabetical Listing of Objects: Ed (object).

vs; List all string variables

Syntax: list vs

Does not include String Registers!

vt; List all tree variables

Syntax: list vt

xf; List X-Functions

Syntax: list xf [<wildcardName>]

If wildCardName is not specified, all X-Functions are listed. If wildCardName is specified, the output is limited to those X-Functions whose names include the wild card string. For example:

list xf impi*;

Produces the following output:

impIgorPro
impImage
impinfo

An X-Function, lx, exists which does the same thing, but allows for more flexible control of the output.

See Also:

Ed (object) to provide script access for the Code Builder.

Edit command to open the LabTalk Variables and Functions dialog.

Document (command) to loop over objects.

Delete (command) to delete LabTalk variables.