SetLongName
Sets the long name of an object
BOOL SetLongName( LPCSTR lpcszLongName, BOOL bUpdateShortName = true, BOOL bUpdateDisplay = true )
TRUE if OK. FALSE if object does not have long name support
EX1
// Standard, two-column worksheet should be active void OriginObject_SetLongName_Ex1() { Page pg = Project.Pages(); // Active workbook Worksheet wks = Project.ActiveLayer(); // Active worksheet Column col(wks, 1); pg.SetLongName("A workbook can have both Long and Short Names"); string str = pg.GetLongName(); out_str(str); col.SetLongName("A Column can have both Long and Short Names"); str = col.GetLongName(); out_str(str); // A worksheet Long Name was added in Origin 9.1 string strLN = "Sheet Long Name supports more characters [some not allowed in Short Name]"; BOOL bb = wks.SetLongName(strLN); str = wks.GetLongName(); // A worksheet Short Name can include up to 31 characters // and can not include `!%|"<>()[]{ or } wks.SetName("Worksheet name can have 31 char"); str = wks.GetName(); pg.Refresh(); }
Sets the long name of an object that supports both long and short names
Only Column and Page objects support long name
OriginObject::GetLongName
origin.h