The Execute method executes a LabTalk script in specified context.
VB: Function Execute(script As ByVal String, [ Name As ByVal Object ] ) As Boolean
C++: bool Execute(LPCSTR script, _variant_t Name )
C#: bool Execute(string script, var Name )
'Assumes Graph1 exists and contains axis 'Setting x axis scale: Dim oApp As Origin.ApplicationSI Dim bb As Boolean Set oApp = GetObject("", "Origin.ApplicationSI") bb = oApp.Execute("X1=0;X2=10","Graph1")
static void Main(string[] args) { Origin.IOApplication pOrigin; pOrigin = new Origin.ApplicationSIClass(); //set X axis scale if (pOrigin.Execute("X1=0;X2=20", "Graph1")) System.Console.WriteLine("Set graph scale successfully!"); }
import OriginExt as O app = O.Application(); app.Visible = app.MAINWND_SHOW grPageName = app.CreatePage(app.OPT_GRAPH) app.Execute("x1=5;x2=27", grPageName)
8.0SR2