2.1.25 LTVar


Description

The LTVar property allows access to LabTalk floating point variables.


Syntax

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)

Parameters

Name
--

Remark

Examples

VBA

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")

C#

        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();
        }

Python

import OriginExt as O
app = O.Application(); app.Visible = app.MAINWND_SHOW
app.PutLTVar("TestVar", 3.1415926)
print(app.GetLTVar("TestVar"))

Version Information

8.0SR2


See Also

LTStr