The LTStr property provides access to LabTalk string variables.
VB: Property Get/Let LTStr(Name As ByVal String ) As String
C++: LPCSTR LTStr(LPCSTR Name )
C#: string LTStr(string Name )
Python: def GetLTStr(self, Name)
Dim oApp As Origin.ApplicationSI Dim str As String Set oApp = GetObject("", "Origin.ApplicationSI") str = "Test" oApp.LTStr("ABC$") = str str = oApp.LTStr("ABC$")
public void LTStr() { Origin.IOApplication pOrigin; Origin.GraphLayer gl; pOrigin = new Origin.ApplicationSIClass(); pOrigin.Visible = MAINWND_VISIBLE.MAINWND_SHOW; //%Y is the labtalk string register to hold the current user file folder path //%G is the current project file name //use MessageBox class, you need to import System.Windows.Forms; MessageBox.Show(pOrigin.get_LTStr("%Y") + pOrigin.get_LTStr("%G"), "Current project name"); } static void Main(string[] args) { Program p = new Program(); p.LTStr(); }
import OriginExt as O app = O.Application(); app.Visible = app.MAINWND_SHOW app.PutLTStr("TestStr", "TestStrValue") print(app.GetLTStr("TestStr"))
8.0SR2
LTVar