3.7.3.1 Visual Objects Created by Origin

Visual objects created by Origin are hierarchical in nature. For example, each Origin child window contains a visual page with an associated page object. A page can be either a graph or worksheet page, but most page object properties affect the visual graph page.

Each graph page contains at least one visual layer with an associated layer object. Because a graph window can contain only one page, when accessing the layer object's properties or methods, the associated page object is not included or referenced. Thus, the property and method syntax of the layer object does not include the syntax of the page object.

For example:

[winName!]layer[n].property =

NOT

[winName!]page.layer[n].property =

The graph layer contains a set of X Y axes with associated X, Y, etc. objects. Because a page can contain multiple layers, when accessing the X, Y, etc. object's properties or methods, the associated layer object is included or referenced. Thus, the X, Y, etc. objects' method and property syntax includes the syntax of the layer object. The X, Y, etc. objects are sub-objects of the layer object.

For example:

[winName!]Layer[n].X.property =

NOT

[winName!]X.property =

The axes within an Origin child window can also contain graphic elements including tick labels, an axis break, and an axis grid. These visual elements have associated objects (label, break, and grid). The label, break, and grid objects are sub-objects of the respective X, Y, etc. object, which is a sub-object of the layer object. The object method and property syntax of the sub-objects includes the syntax of the "main" object.

For example:

[winName!]Layer[n].Y.break.property =

NOT

[winName!]break.property =

Each worksheet page contains no more than one visual worksheet with an associated wks object. The worksheet page also contains no more than one layer with an associated layer object. Because a worksheet window can contain only one page, and the page contains only one worksheet, when accessing the wks object's properties or methods, the associated page object is not included or referenced. Likewise, because the worksheet page contains only one layer, when accessing the layer object's properties or methods, the associated page object is not included or referenced. Thus, the syntax of the wks and layer objects does not include the syntax of the page object.

For example:

[winName!]wks.property =

NOT

[winName!]page.wks.property =

For example:

[winName!]layer.property =

NOT

[winName!]page.layer.property =

The worksheet contains visual columns with associated col objects. The col object is a sub-object of the wks object. Thus, the col object method and property syntax includes the syntax of the wks object. Additionally, like the layer object, the col object is enumerated if the active column is not to be referenced.

For example:

[winName!]wks.col[n].property =

NOT

[winName!]col[n].property =

Window objects available in Origin:

  • layer
  • layer.axis
  • layer.axis.break
  • layer.axis.grid
  • layer.axis.label
  • layer.plotn.boxchart
  • layer.plotn.contourlabels
  • layer.plotn.numericformats
  • page
  • wks
  • wks.col
  • wks.export
  • wks.import

Property and Method Syntax:

Properties and methods of Origin's window objects affect the object in a specific window. If a window is not specified, the active window is used. The window object syntax is as follows:

[WinName!]objName.Method(arguments)
[WinName!]objName.Property = value
[WinName!]objName.Property$ = string
  • WinName! is optional. However, if winName is specified, its name must be followed by an exclamation point "!". If winName! is not specified, the named object in the active window is affected.
  • objName is the name of the object.
  • Method is one of the available objName methods.
  • arguments are specific to the method.
  • Property is a valid property for objName.
  • value is a number.
  • string is a text string or string variable.