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

4.12 FAQ-371 Where can I find examples and help with scripting?

Last Update: 2/4/2015

There are many LabTalk script files (with OGS file extension) located in the folder of <Origin Installation Directory>/Samples/LabTalk Script Examples/. You can open any of these files from Code Builder (open by menu View: Code Builder) and view the scripts.


To run any of the examples from the Command Window, you can follow the steps below:

  1. Use cd X-Function to locate the current working directory to the folder of these LabTalk script files, like:
    cd 2;
  2. List all the files in this directory by using dir X-Function:
    dir;
  3. This step is optional. To open a file in Code Builder, you can use ed.open(fileName.ogs), such as:
    ed.open(embed_graphs.ogs);
  4. To run an example, just pick one from the list and simply type the file name in the Command Window, and press Enter, for example:
    embed_graphs;

The LabTalk Scripting Guide, the LabTalk Language Reference and Script Examples are all useful in learning LabTalk.


Keywords:LabTalk, macro, OGS

 

© OriginLab Corporation. All rights reserved.