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).
Example: 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)";
};
|
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.
|
LBC
|
(2019b) Execute for all Data Connector-containing sheets in all workbooks and matrixbooks in the project. %H contains the current book name in each iteration. Books not having connectors will be skipped. For example, the following code will loop and convert the Data Source to Absolute Path.
doc -e LBC {
%H=;
page.Active=;
wks.dc.SType=0;
}
|
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.
|
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.
Example: 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;
}
}
|
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
The following script prints the contents of all graph windows in the project.
doc -e P print;
|
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.
Example: The following script puts the name of the first worksheet into %A.
doc -e W
{
%A = %H;
break;
};
|
WM
|
Execute for all workbooks and matrixbooks 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
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
Syntax doc -ffu
Force the all column formula in the project file to update no matter in what situation.
-gp
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.
-ha
Hide all windows in the active folder. GUI equivalent is Window: Hide all Windows.
-l
Syntax: doc -l
Send an update message to all windows.
-lr
Syntax: doc -lr flag
Note:
doc -lr 0; // turn off all flags
-m
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
|
-pda
Syntax: doc -pda[d]
Apply Master Template page dimensions to other graph pages in the project:
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.
-rr
Syntax: doc -rr
Recover the ranges with empty UID data reference in the entire project.
-rri
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
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.
-u; Set update flags=
Syntax: doc -u
Set update flags for all layers in all windows.
-uw
Syntax: doc -uw
Set update flags for all layers in the current window only.
-wf
Syntax: doc -wf [option]
remove all cell or column formula/links/script:
- option = 1 : remove column formula and keep values
- option = 2 : remove cell formula and links and keep values
- option = 4 : delete script in all worksheet script
- option = 8 : delete script in all button script
- option = 16 : convert DDE links to their values in the whole project
- option = 32 : clean section storage and tree storage in all windows
All options are bit combination. For example, you can write the command as below:
doc -wf 3; ///wipe out all col formula & cell formula/link(Option = "1"+"2"="3")
doc -wf; ///remove all formula, links and relevant script
-wpl
Syntax: doc -wpl fileName
load windows position settings from fileName
-wps
Syntax: doc -wpl [fileName]
save windows position settings to fileName. filename can be optional, relative filename will be saved to user file folder
-xw
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.