OriginLab Corporation - Scientific Graphing and Data Analysis Software - 2D graphs, 3D graphs, Contour Plots, Statistical Charts, Data Exploration, Statistics, Curve Fitting, Signal Processing, and Peak Analysis

LabTalk Script Programming

LabTalk is Origin's proprietary scripting language. LabTalk has a C-like syntax, and is primarily a collection of commands and objects with methods and properties. It is well suited for creating macros, or script segments, to programmatically put together typical graphing and analysis operations to automate routine tasks. LabTalk provides access to many internal Origin objects such as project folders, graphs, worksheets, and data plots and their properties.

In Origin 8, the vast majority of analysis and data processing tools have been implemented using a new framework called X-Functions. The script programming environment can be used to call these X-Functions to perform the operations, thus enabling user to create script macros that tap into the vast array of functionality available from the GUI.

Origin 8 also introduces the concept of "Analysis Templates", where user can set up an analysis sequence from the GUI and then save the Workbook, or Matrix Book, or even the entire Origin project as a "template" for repeated use. A new instance of an Analysis Template could then be opened and new data imported to update the results of the analysis procedures saved in the template. From a scripting point of view, this enables the script programmer to open such templates and issue commands to import new data from a file and get updated results, thus allowing for the creation of script macros that perform batch processing of multiple data files.

LabTalk scripting is well suited for simpler tasks, but might become difficult to debug and maintain for more complicated tasks, or when speed is crucial, such as processing very large datasets, performing numerical computation, or when a large number of program loops are involved. For this reason, the Origin C language was developed. The new X-Function framework uses Origin C as the core component of an X-Function. Thus any computationally intensive task could be coded as an X-Function, and once coded the functionality can still be accessed from LabTalk script, allowing for the custom functionality to be then incorporated in script macros.