2.1.44 Reset


Description

Empty all worksheets and fill all matrices with missing-value.

Syntax

VB: Function Reset([ ReduceWks As ByVal Object ], [ ReduceMatrices As ByVal Object ] ) As Boolean
C++: bool Reset(_variant_t ReduceWks, _variant_t ReduceMatrices )
C#: bool Reset(var ReduceWks, var ReduceMatrices )

Parameters

ReduceWks
This is an optional argument and it's default is true.
If set to false then all worksheets are emptied.
If set to true then all worksheets are emptied and size adjusted to 30 rows.
ReduceMatrices
This is an optional argument and it's default is true.
If set to false then all matrices are filled with missing-value.
If set to true then all matrices are filled with missing-value and size adjusted to 2 rows and 2 columns.

Return

The Reset method returns true if successful else false.

Remark

Examples

VBA

'Assumes there are worksheets and matrices in current Origin session.
Dim oApp As Origin.ApplicationSI
Dim bb As Boolean
Set oApp = GetObject("", "Origin.ApplicationSI")
bb = oApp.Reset(False)

C#

using Origin;
static void testReset()
{
	// Connect to Origin.
	Origin.ApplicationSI originApp = new Origin.ApplicationSI();

	// Empty worksheet columns but do not adjust size to 30 rows.
	bool bReduceWks = false;

	// Fill matrices with missing values AND adjust size to 2 rows and 2 columns.
	bool bReduceMatrix = true;

	// Reset all worksheets and matrices.
	originApp.Reset(bReduceWks, bReduceMatrix);
}

Python

import OriginExt as O
app = O.Application(); app.Visible = app.MAINWND_SHOW
filePath = app.Path(app.APPPATH_PROGRAM) + "Samples\\Curve Fitting\\" + "2D Bin and Fit.opj"
app.Load(filePath)
app.Reset()

Version Information

8.0SR2

See Also