The LTVar property allows access to LabTalk floating point variables.
VB: Property Get/Let LTVar(Name As ByVal String ) As Double
C++: double LTVar(LPCSTR Name )
C#: double LTVar(string Name )
Python: def GetLTVar(self, Name)
Dim oApp As Origin.ApplicationSI Dim var As double Set oApp = GetObject("", "Origin.ApplicationSI") var = 2.5 oApp.LTVar("XYZ") = var var = oApp.LTVar("XYZ")
public void LTVar() { Origin.IOApplication pOrigin; pOrigin = new Origin.ApplicationSIClass(); pOrigin.Visible = MAINWND_VISIBLE.MAINWND_SHOW; //PI is a session variable with value of 3.1415926535898 //use MessageBox class, you need to import System.Windows.Forms; MessageBox.Show(pOrigin.get_LTVar("PI").ToString(), "PI"); } static void Main(string[] args) { Program p = new Program(); p.LTVar(); }
import OriginExt as O app = O.Application(); app.Visible = app.MAINWND_SHOW app.PutLTVar("TestVar", 3.1415926) print(app.GetLTVar("TestVar"))
8.0SR2
LTStr