The long name of this origin object
VB: Property Get/Let LongName As String
C++: LPCSTR LongName
C#: string LongName
Connect to the running Origin. Set the properties of the active Workbook and Column(0). You can see the result in Origin. Then, get the properties from Origin, and output them to Excel sheet.
Public Sub Setting() Dim app As Origin.ApplicationSI Dim WkBk As Origin.WorksheetPage Dim Wks As Origin.Worksheet Set app = New Origin.ApplicationSI Set Wks = app.FindWorksheet("") 'Select the active Worksheet Set WkBk = Wks.Parent 'Select the active Workbook 'Set the ShortName of the Workbook WkBk.Name = "Data" 'Set the LongName of the Workbook WkBk.LongName = "Test" 'Set the ShortName of the Column Wks.Columns(0).Name = "CH1" 'Set the LongName of the Column Wks.Columns(0).LongName = "Temperature" 'Get the properties from Origin, and output them to Excel sheet Range("A1") = WkBk.Name Range("A2") = WkBk.LongName Range("B1") = Wks.Columns(0).Name Range("B2") = Wks.Columns(0).LongName End Sub
Using Origin; static void Setting() { ApplicationSI app = new ApplicationSI(); Worksheet wks = app.FindWorksheet(""); //Select the active Worksheet WorksheetPage wkbk = (WorksheetPage)wks.Parent; ////Select the active Workbook //Set the ShortName of the Workbook wkbk.Name = "Data"; //Set the LongName of the Workbook wkbk.LongName = "Test"; //Set the ShortName of the Column wks.Columns[0].Name = "CH1"; //Set the LongName of the Column wks.Columns[0].LongName = "Temperature"; //Get the properties from Origin, and output them to console Console.WriteLine(wkbk.Name + "\n" + wkbk.LongName + "\n" + wks.Columns[0].Name + "\n" + wks.Columns[0].LongName + "\n"); Console.ReadLine(); }
8.0SR2
Name | Column.Type | Column.Units | Column.Comments