3.7.5.58 System

LabTalk Object Type:

Utility


The system object properties allow you to read and alter a variety of settings which are maintained in the OPTION.CNF file. Note: The system object includes the following sub-objects:

Properties:

Property Access Description
System.bits Read only, numeric

The bit value of Origin. Returns 32 or 64.

System.date Read only, numeric

The current date and time in numeric format. Equivalent to the @D system variable. To display the information as a date or time, use $(system.date,D#) where # is an index to the Origin date formats. See also system.date().

System.debug Read/write, numeric

Debug mode executes LabTalk statements that begin with #!. Equivalent to the @B system variable. 1 = enable, 0 = disable.

System.explorer Read/write, numeric

Controls the type of Open and Save As dialog boxes used in 32 bit Origin in Windows 95: 1 = Standard Explorer dialog boxes, 0 = Origin dialog boxes including a Show Info check box (and associated Comments text box). The fdlog object controls the display of the Show Info check box. Note: 16 bit Origin returns a missing value.

System.extBackColor Read/write, numeric

Set the graph window background color, outside of the page: 0 = extend page color to entire window. 1 = show area outside of page as gray. It's value is independent of @G system variable, if either of them is 0, then gray background will be gone. .

System.level Read only, numeric

Starting menu level.

System.pageCol Read/write, numeric

Current page column number in worksheet printing.

System.pageRow Read/write, numeric

Current page row number in worksheet printing.

System.priority Read/write, numeric

Controls the Origin EXEs Windows process priority: 64 = low, 32 = normal, 128 = high, 256 = realtime. Realtime is strongly discouraged.

System.product Read only, numeric

OriginLab product code. The first bit of this property indicates whether the product is Origin or OriginPro: 0 = Origin and 1 = OriginPro. Thus, to determine if the product is Origin or OriginPro, you must do a bitwise AND of system.product and the value 1 using the bitwise AND operator "&". For example:

if (system.product&1 == 1) 
{ 
   type -b "OriginPro";
} 
else 
{  
   type -b "Origin";
};
System.pureColor Read/write, numeric

Display control: 0 = use dithered color, 1 = use pure color.

system.reportlanguage Read/write, numeric

Control whether to use English (including Date & Time format) in analysis reports and graphs. 1 for yes, 0 for no. Only available in non-English language Origin.

System.resolution Read only, numeric

X resolution of the page and is dependent on the resolution of the printer driver in dots per inch (dpi). For related information, see page.resX and page.resY.

System.saveControl Read only, numeric

File type to be saved: 0 = project, 1 = template.

System.ShowOneNameInPE Read/Write, numeric

Control whether to show one window name in the Project Explorer, when the View mode is not set to Details. 0 = show both window Short Name and Long Name (if exists) in the format of SN - LN. 1 = Show window Long Name only, if Long Name is not available, show Short Name.

System.sigDigitsL Read/write, numeric

Maximum number of significant digits displayed to the right of the decimal place for small numbers. Should be specified in negative numbers, i.e. -3 specifies 3 significant digits to the right of the decimal place.

System.sigDigitsU Read/write, numeric

Maximum number of significant digits for large numbers. For example, if this property is set to 4, 1234567.0 displays as 1.234 E 6.

System.version Read only, numeric

The version number of the Origin software. This is the same as the @V system variable.

System.winViewFSize Read/write, numeric

Font size scalar for display in Window View mode. This is the same as the @W system variable.

Methods:

Method Description
System.date()

Returns the current date and time in numeric format. To display the information as a date or time, use $(System.Date(),D#) where # is an index to the Origin date formats.

System.loadPref([FileName])

Load Origin's preferences from the specified FileName. If no file name is provided, then the OPTION.CNF file is used. If "1" is specified for FileName, then the internal defaults are loaded. The internal defaults are the values used in the event that the OPTION.CNF file doesn't exist.

System.savePref([FileName])

Save Origin's preferences to the specified FileName. If no file name is specified, then the OPTION.CNF file is used.

Examples:

The following script displays the present date in MM/DD/YY format on an existing text label named Today.

Today.text$ = $(system.date,D0);
//uses the label.text$ property