Changes to LabTalk Scripting

From OriginLab Wiki

Jump to: navigation, search


We keep adding new features, please refer to the Release Notes for details of feature implement in a specific Origin version.

[edit] From 8.0 To 8.1

  • Layer Command
    The Layer command can delete a worksheet with all columns, by the syntax -dd.
  • System Variable @TOS
    System variable @TOS=1 (ON by default) was added to control text stretch in Window View.
  • % Notation
    The % notation to show page long name and comments were added.
    • %(%H, @PL): page long name.
    • %(%H, @PC): page comment.
    • %(%H, @PC1): page comment first line.
  • Layer.CMap Object
    More properties and methods for object Layer.CMap to provide precise control.
  • Function Definition
    Function definition was supported in LabTalk.
  • Ed Dialog
    Improvement on ed dialog provides script users the flexibility in viewing variables, functions etc.
  • Cell Link Notation
    Cell link notation allows LabTalk string expression, such as str://"We are in "+page.longname$+", at sheet "$.

[edit] From 7.5 To 8.0

  • Variable Scope
    Click here to learn more about variable scope.
  • Range Notation
    Click here to learn more about range notation and declaration.
  • String Assignment
    String assignment in Origin 8.0 requires the $ symbol and has no space between the object or variable and the $. For example: "col(1)[1] $=" does not work in Origin 8.0; both "col(1)[1]$ =" and "col(1)[2]$=" are OK. Click here to learn more about string variable.
  • String Functions
    Click here to learn more about string functions.
  • Expand LabTalk Data Types
    The new LabTalk Data Types have C-like methods and properties.
  • X-Function Access
    X-Functions can be easily executed from LabTalk scripts. The new command window has extended support for accessing X-Functions.
  • Command Window
    The Command Window is a new window introduced in Origin 8.0 that provides a comprehensive interface for developing, saving and running LabTalk script.
  • String Registers
    %C through %I, %X and %Y are considered reserved by Origin, they are string registers. Especially, %Z can hold a long string for temporary storage, up to 6290 characters. And %D has the meaning of current working directory, somewhat like operating in DOS, LabTalk script files (*.ogs) can be run directly in current working folder, that is the different meaning from Origin 7.5.
  • System Variable @AM
    System variable @AM is added to control analysis markers.
  • LabTalk Access to Sampling Interval Information
    Four variables were added for accessing to sampling interval infomation: wks.col.xinit, wks.col.xinc, wks.col.xname, wks.col.xunits.
  • System.FileExt.AddType()
    The AddType method was never added to System.FileExt as it was not needed.
  • returns z increment, but not y increment any more.
  • X-Function "newlayer" Was Removed
    The X-Function "newlayer" was removed since it was duplicated with "layadd".
  • Delete Command
    More methods were added to handle local variable deleted, such as -rar, -ras, -rav, -rac, -rat, -raa, -rag.
  • Accessing Elements of a Matrix
    In Origin 7.5, accessing elements of a matrix was by using syntax MatrixName[n], where n=(RowIndex-1)*NumbersOfColumns+ColumnIndex. This syntax will not work in Origin 8.0 any longer, but the syntax MatrixName[RowIndex, ColumnIndex] instead.