【お知らせ】この部分は英語原文のみでの提供となります。何卒ご了承ください。
2.2.4.32.25 OriginObject::GetName
Contents
Description
The short name of the Origin object, which can be a Column, a Layer, or a Page
Get the name of a worksheet or matrix layer
Syntax
string GetName( )
BOOL GetName( string & str )
Parameters
- str
- [output] String to receive name of worksheet layer
Return
Name of the Origin object, or the Short Name if object has both long and short names.
TRUE for success, FALSE if object does not have a name.
Examples
EX1
// Get the Short Name of the active window void OriginObject_GetName_Ex1() { Page page = Project.Pages(); if(page) printf("The active window's short name is %s\n", page.GetName()); }
EX2
int OriginObject_GetName_Ex1() { WorksheetPage wp = Project.WorksheetPages(0); if(!wp) return -1; Page pg(wp.GetName()); Layer lay = pg.Layers(); // gets the active worksheet layer Worksheet wks = lay; if (wks) { string strName; wks.GetName(strName); out_str(strName); } return 0; }
Remark
Retrieves the name of a OriginObject.
See Also
Header to Include
origin.h