Changes to LabTalk Scripting

From OriginLab Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 07:13, 19 November 2012 (edit)
Kathy (Talk | contribs)
(From 8.1 To 8.5)
← Previous diff
Revision as of 07:52, 19 November 2012 (edit) (undo)
Kathy (Talk | contribs)
(From 8.1 To 8.5)
Next diff →
Line 4: Line 4:
==From 8.1 To 8.5== ==From 8.1 To 8.5==
-*Range Notation+*[http://wiki.originlab.com/~originla/ltwiki/index.php?title=LabTalk:Range_Notation '''Range Notation''']
-*:range.Reverse()+*:A new [http://wiki.originlab.com/~originla/ltwiki/index.php?title=LabTalk:Range_Notation#Methods_of_Range method] range.reverse( ), is available to invert the range.
-*:The range notation of LabTalk can allow variables for row subrange.+*:The range notation of LabTalk allows variables for [http://wiki.originlab.com/~originla/ltwiki/index.php?title=LabTalk:Range_Notation#Column_Subrange column subrange].
-*:Improve range notation to get the worksheet column range on a worksheet.+*:Range notation is improved to get the worksheet column range on a worksheet, i.e. the range -w and range -wx syntax can be used in worksheet.
*[http://wiki.originlab.com/~originla/wiki/index.php?title=LabTalk:System_Variables '''System variables'''] *[http://wiki.originlab.com/~originla/wiki/index.php?title=LabTalk:System_Variables '''System variables''']
*:@MBC - to control the color used to represent missing values in matrix. *:@MBC - to control the color used to represent missing values in matrix.
Line 14: Line 14:
*:@PIH - access Handles *:@PIH - access Handles
*:@PIV - access virtual memory usage *:@PIV - access virtual memory usage
-*[http://wiki.originlab.com/~originla/ltwiki/index.php?title=LabTalk:Run_%28command%29 '''Run command''']+*'''Run command'''
-*:The run command can be used to change the recalculate mode for the entire project, by the syntax [http://wiki.originlab.com/~originla/ltwiki/index.php?title=LabTalk:Run_%28command%29#-au_value.3B_Change_the_recalculate_mode_for_entire_project run -au] without UID.+*:The [http://wiki.originlab.com/~originla/ltwiki/index.php?title=LabTalk:Run_%28command%29 run] command can be used to change the recalculate mode for the entire project, by the syntax [http://wiki.originlab.com/~originla/ltwiki/index.php?title=LabTalk:Run_%28command%29#-au_value.3B_Change_the_recalculate_mode_for_entire_project run -au] without UID.
-*[http://wiki.originlab.com/~originla/ltwiki/index.php?title=LabTalk:Document_%28command%29 '''Document command''']+*'''Document command'''
-*:It is supported to bring back the auto save reminder dialog with the syntax [http://wiki.originlab.com/~originla/ltwiki/index.php?title=LabTalk:Document_%28command%29#-ca.3B_Reactivate_the_auto_save_option_dialog doc -ca] and/or [http://wiki.originlab.com/~originla/ltwiki/index.php?title=LabTalk:Document_%28command%29#-cas.3B_Reactivate_the_auto_save_option_dialog_and_save_the_current_project doc -cas].+*:The [http://wiki.originlab.com/~originla/ltwiki/index.php?title=LabTalk:Document_%28command%29 document] command can be used to bring back the auto save reminder dialog with the syntax [http://wiki.originlab.com/~originla/ltwiki/index.php?title=LabTalk:Document_%28command%29#-ca.3B_Reactivate_the_auto_save_option_dialog doc -ca] and/or [http://wiki.originlab.com/~originla/ltwiki/index.php?title=LabTalk:Document_%28command%29#-cas.3B_Reactivate_the_auto_save_option_dialog_and_save_the_current_project doc -cas].
-*[http://wiki.originlab.com/~originla/ltwiki/index.php?title=LabTalk:DoToolbox_%28command%29 '''Dotoolbox command''']+* '''Dotoolbox command'''
-*:Add new options for the dotool/dotoolbox command to realize some new features, such as panning, inserting OLE object etc.+*:Add new options for the [http://wiki.originlab.com/~originla/ltwiki/index.php?title=LabTalk:DoToolbox_%28command%29 dotoolbox] command to realize some new features, such as panning, inserting OLE object etc.
*:*19: panning *:*19: panning
*:*20: insert equation editor *:*20: insert equation editor
Line 27: Line 27:
*'''Peak Analyzer''' *'''Peak Analyzer'''
*:Support to change the settings of the Peak Analyzer tool with the [http://wiki.originlab.com/~originla/wiki2/index.php?title=X-Function:Op_change op_change] x-function. *:Support to change the settings of the Peak Analyzer tool with the [http://wiki.originlab.com/~originla/wiki2/index.php?title=X-Function:Op_change op_change] x-function.
-*[http://wiki.originlab.com/~originla/ltwiki/index.php?title=LabTalk:Window_%28command%29 '''Window command''']:+* '''Window command'''
-*:You can use the window/win command to hide/show notes windows using the syntax [http://wiki.originlab.com/~originla/ltwiki/index.php?title=LabTalk:Window_%28command%29#-hn.3B_Hide_or_show_a_Notes_window win -hn].+*:You can use the [http://wiki.originlab.com/~originla/ltwiki/index.php?title=LabTalk:Window_%28command%29 window] command to hide/show notes windows using the syntax [http://wiki.originlab.com/~originla/ltwiki/index.php?title=LabTalk:Window_%28command%29#-hn.3B_Hide_or_show_a_Notes_window win -hn].
*Worksheet and Matrix Manipulation *Worksheet and Matrix Manipulation
*:Add NMATS property to wks object *:Add NMATS property to wks object

Revision as of 07:52, 19 November 2012


Contents


From 8.1 To 8.5

  • Range Notation
    A new method range.reverse( ), is available to invert the range.
    The range notation of LabTalk allows variables for column subrange.
    Range notation is improved to get the worksheet column range on a worksheet, i.e. the range -w and range -wx syntax can be used in worksheet.
  • System variables
    @MBC - to control the color used to represent missing values in matrix.
    @PIM - access memory usage
    @PIG - access GDI objects
    @PIH - access Handles
    @PIV - access virtual memory usage
  • Run command
    The run command can be used to change the recalculate mode for the entire project, by the syntax run -au without UID.
  • Document command
    The document command can be used to bring back the auto save reminder dialog with the syntax doc -ca and/or doc -cas.
  • Dotoolbox command
    Add new options for the dotoolbox command to realize some new features, such as panning, inserting OLE object etc.
    • 19: panning
    • 20: insert equation editor
    • 21: insert word
    • 22: insert excel
    • 23: insert OLE object
  • Peak Analyzer
    Support to change the settings of the Peak Analyzer tool with the op_change x-function.
  • Window command
    You can use the window command to hide/show notes windows using the syntax win -hn.
  • Worksheet and Matrix Manipulation
    Add NMATS property to wks object
    Add lname properties to wks and matrix objects
    Implement Csetvalue and msetvalue x functions
    Support set column/sheet position in Labtalk.
    Support "+" to concatenate strings columns in set column values dialog.
  • Layer.cmap object:
    Change the search method of the layer.cmap. object to first find the active plot and fix a bug in the Layer.cmap.undatescale() method.
  • Set command
    Added set -lm command to extend plot line to full X range when there are missing Y values at the end of the curve.
  • LT error message

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 "+wks.name$.

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.
  • layer.z.inc
    layer.z.inc 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.