D
|
If a graph window is active, execute for all data plots in the active layer. If a worksheet is active, execute for all datasets (columns) in the active worksheet. (If a matrix is active, there is only one iteration.) %H contains the window name and %C the dataset name in each iteration.
|
DY
|
If a graph window is active, execute for all data plots in the active layer excluding error bars and labels. If a worksheet is active, execute for all Y datasets (only) in the active worksheet. (If a matrix is active, there is only one iteration.) %H contains the window name and %C the dataset name in each iteration.
|
G
|
Execute for all labels and other named objects in the active graph layer, the active worksheet, or the active layout page. %B contains the object name in each iteration. This is the same object collection as shown by list -o.
|
L
|
Execute for all layers in the project. Note that a layout page has one layer, while a workbook, matrixbook, and graph can have multiple layers. %H contains the window name in each iteration. Page.active holds the active layer number. To express Page.active, for example, in a type statement, use $(page.active).
|
LP
|
Execute for all layers in all graph windows and Layout windows (only) in the project. %H contains the window name in each iteration. Page.active holds the active layer number.
|
LB
|
(8.0 SR3) Execute for all sheets in all workbooks and matrixbooks in the project. %H contains the current book name in each iteration. Page.active holds the active sheet index. See The Origin Project:Looping Over Objects.
|
LR ClassName
|
(8.0 SR3) Execute script on specified report worksheet. Use doc -e LRW for all report sheets in active window.
The ClassName could be
Class Name
|
Analysis tool
|
FitNL
|
Nonlinear Fit
|
FitLinear
|
Linear Fit
|
FitPolynomial
|
Polynomial Fit
|
MR
|
Multiple Linear Regression
|
DescStats
|
Staitistcs on Columns
|
DescStats_1
|
Staitistcs on Rows
|
NormalityTest
|
Normality Test
|
ANOVAOneWay
|
One-Way ANOVA
|
ANOVATwoWay
|
Two-Way ANOVA
|
ANOVAOneWayRM
|
One-Way Repeated Measures ANOVA
|
ANOVATwoWayRM
|
Two-Way Repeated Measures ANOVA
|
ROCCurve
|
ROC Curves
|
For example:
document -e lr ANOVAOneWay
{
tree tt;
getresults tr:=tt;
tt.=; // Type ANOVA report tree
}
|
LW
|
Execute for all layers in the current window only. Note that a layout page has one layer, while a workbook, matrixbook, and graph can have multiple layers. %H contains the window name in each iteration. Page.active holds the active layer number.
|
M
|
Execute for all matrixbooks in the project. %H contains the matrixbook name in each iteration. Note that this does not iterate at the sheet level. If the matrix created for an embedded image is visible, you can test the value of Page.isEmbedded property to determine that.
|
O
|
Execute for all non-minimized windows in the project. %H contains the window name in each iteration. Note that an embedded graph - even one in a minimized workbook window - will be counted. Use the Page.isEmbedded property to determine if this is the case.
|
P
|
Execute for all graph windows and layout windows in the project. %H contains the window name in each iteration.
(Note: To exclude graph windows embedded in a worksheet cell, you can test the value of Page.isEmbedded property.)
doc -e p {win -ppc} // Clean up all the graph previews from an OPJ
|
S
|
Execute for all datasets in the project. %C contains the dataset name in each iteration.
|
W
|
Execute for all workbooks in the project. %H contains the window name in each iteration.
|
WW
|
Behaves the same as "W" but skips over any Excel books in the project.
|
See also other looping commands: for, loop, repeat.
-ef; Execute the given script for all objects in the current folder
Syntax doc -ef
Execute the given script for all objects of the specified kind in the current Project Explorer folder. Same as the -e option, but only the current Project Explorer folder will be considered.
Note: This assumes that the Project Explorer view mode is set to View Windows in Active Folder. If the view mode is set to View Windows in Active Folder & Subfolders, then this command will consider the active folder and subfolders.
-ffu; Force the column formula to update
Syntax doc -ffu
Force the all column formula in the project file to update no matter in what situation.
-gp state; Generate previews for earlier version graphs in Project Explorer
Minimum Origin Version Required: 2015 SR0
Syntax doc -gp state
Generate previews for earlier version graphs in Project Explorer so hovering over the graph icon will show tooltip view. If state = 0, generate previews for current folder, not recursive. If state = 1, generate previews for current and sub folders. If state = 2, generate previews for entire project.
-l; Send an update message to all windows
Syntax: doc -l
Send an update message to all windows.
-log; Open the Audit Log dialog
Syntax: doc -log
Open the Audit Log dialog. Select Enable to track changes to the project. When first enabled, you will be prompted to establish an optional password for the Audit Log.
-log1 [password]; Enable the Audit Log for current project with an optional password
Syntax: doc -log1 [password]
Enable the Audit Log for current project with an optional password. If a password is set, you will need to enter the password when disabling auditing. This log can be viewed by anyone but can only be stopped by those who know the password.
-log0 [password]; Disable the Audit Log for current project
Syntax: doc -log0 [password]
Disable the Audit Log for current project. If a password has been set, you will need to enter the password when disabling auditing.
-lr flag; Control access to OC/LabTalk codes attached to OPJ
Minimum Origin Version Required: 2015 SR0
Syntax: doc -lr flag
Note:
doc -lr 0; // turn off all flags
-m Origin_window_state; Control the display state
Syntax: doc -m Origin_window_state
These options control the display state of the Origin window:
0
|
Hide
|
1
|
Normal
|
2
|
Minimize
|
3
|
Maximize
|
4
|
Restore
|
5
|
Show
|
-mg Origin_modified_state; Get the modified state
Syntax: doc -mg Origin_modified_state
Get the modified state of current project and output into variable Origin_modified_state, Origin_modified_state = 1 if modified, 0 if not modified.
-ms; clear the modified state
Syntax: doc -ms
Clear the modified state for project and pages.
-n; Start new project
Syntax: doc -n
Execute the DocEnd macro (if defined). Close the current project. Read the ORGSYS.CNF file. Open a new project. The new project is defined by your settings under Tools : Options : [Open/Close] : 'Start New Project'.
-nf; Add a new folder to Project Explorer
Syntax: doc -nf
Create a new folder directly off of the root folder in Project Explorer. The new folder will have the name Foldern where n is an integer corresponding to the order in which it was created.
-o projectName; Open a project
Syntax: doc -o projectName
Open a new Origin project, using the following steps:
- Execute the DocEnd macro (if defined). This will close any currently open project.
- Read the ORGSYS.CNF file and execute the DocBegin macro (if defined).
- Open the named project (Note: projectName must be a full path description, including the file extension).
-of objectName; Open a project in different directory
Syntax doc -of objectName
Execute the DocEnd macro (if defined). Close the current project. Read the ORGSYS.CNF file. Execute the DocBegin macro (if defined). Open the named project using the full path and name specified. If no path, then look first in the current directory, then in the software directory.
projectName must be a full path description, including the file extension. Look for projectName first in the current directory and then in the software directory.
-pda[d]; Apply Master Template page dimensions to other graph pages in the project
Syntax: doc -pda[d]
The Master Template must be active when the command is issued. The optional d dumps a list of affected graphs to the Messages Log.
Note, that this command cannot convert landscape-oriented pages to portrait or vice versa. To change page orientation, see the page -o command.
-pw; Supply password for modifying project
Syntax: doc -pw password
Provides Admin password set by doc -pwa (see next). Changes to project cannot be saved without password.
-pwa; Password protect against modifying project
Syntax: doc -pwa
Sets an Admin password for saving changes to the current project.
-pwd; Password protect against opening project
Syntax: doc -pwd
Opens a dialog to set or change the password for the current project. Password is required to reopen the OPJ.
-pwr [password]; Remove Admin password from project
Syntax: doc -pwr ;
If no password is specified, then you must first log in remove the password.
-pwta; List books/sheets with protection turned on
Syntax: doc -pwta;
-pwx; Logout of Admin mode
Syntax: doc -pwx;
Once logged out, no changes are permitted to anything related to protections.
-r newName; Rename the current project
Syntax: doc -r newName
Rename the current project to newName. Origin resets the path to your User Files Folder.
-rr; Recover the range with empty UID data reference in the entire project
Syntax: doc -rr
Recover the ranges with empty UID data reference in the entire project.
-rri; Recover the range with empty UID data reference and inputs
Syntax: doc -rri
Recover the ranges with empty UID data reference, and also recover the inputs of operations in the entire project (it is not always reliable because it involves some guessing).
-rrit; Connect the table objects on graph pages for the whole project
Syntax: doc -rrit
Connect the table objects on graph pages for the whole project after loading it. You have to manually refresh graphs after this to see table objects.
-s; Turn off the save flag
Syntax: doc -s
Turn off the save flag so that no save prompt appears on exit.
-ss state; Control save prompt flag
Syntax: doc -ss state
Control save prompt flag. If state = 1, do not prompt to save on exit even when file is modified. If state = 0, restore to default (prompt to save if modified). The doc -ss 1 option turns off the save prompt for the Origin session unless a doc -ss 0 is executed, while the effect of doc -s ends when a project is (again) modified.
-t path templateFilename; Open the template file
Syntax: doc -t path templateFilename
Open the template file templateFilename. Use this command to open a template from any directory, but if no path is specified then Origin looks first in the User Files Folder and then in Origin EXE folder. You must specify the file extension.
-u; Set update flags
Syntax: doc -u
Set update flags for all layers in all windows.
-uw; Set update flags in current window only
Syntax: doc -uw
Set update flags for all layers in the current window only.
-xw excelBookName; Convert internal Excel book into Origin workbook
Syntax: doc -xw excelBookName
Convert the internal Excel book into Origin workbook. If supply the name excelBookName, it will convert the specified Excel book, or, if the name not supplied, all the internal Excel books in the project, will be converted into Origin workbooks.
Examples:
The following script prints the contents of all graph windows in the project.
doc -e P print;
The next script rescales all layers in the project to show all data, sets each initial X axis scale value to zero, and types the window name and layer number of each to the Script window.
doc -e L
{
layer -a;
x1 = 0;
type "Window: %H, layer number: $(page.active)";
};
The following script puts the name of the first worksheet into %A.
doc -e W
{
%A = %H;
break;
};
This script looks at all non-minimized windows and types its name and window type.
doc -e O {
type = exist(%H);
switch(type)
{
case 2:
if(%H!page.extinfo) type %H is an Excel Workbook;
else type %H is an Origin Workbook;
break;
case 3:
type %H is a Graph window;
break;
case 4:
type %H is a Matrixbook;
break;
case 11:
type %H is a Layout page;
break;
}
}
See Also:
DocBegin,
DocEnd