Hi,
If you want to use get_LTStr, please make sure that the return value ltID is a LabTalk string value.
For the StringArray issue, there is no way to get it directly currently. You can try the following way:
string strCMD1 = "StringArray sa = getTimeArray(); size = sa.GetSize();"; // LT command to return the stringarray to a LT stringarray variable, and get this array size
m_originApp.Execute(strCMD1); // execute the LT command
int size = Int32.Parse(m_originApp.get_LTVar("size").ToString()); // get size to C#
// put the string to C# string array
string[] strarr = new string[size];
for(int i = 1; i <= size; i++)
{
string strCMD2 = "string str$ = sa.GetAt(" + i.ToString() + ")$;"; // LT command to get the ith string
m_originApp.Execute(strCMD2);
strarr[i-1] = app.get_LTStr("str$"); // here use the get_LTStr() method
}
Penn