2.34.8 LongName


Description

The long name of this origin object

Syntax

VB: Property Get/Let LongName As String
C++: LPCSTR LongName
C#: string LongName

Remark

Examples

VBA

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

C#

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

}

Version Information

8.0SR2

See Also

Name | Column.Type | Column.Units | Column.Comments