Hi,
Not support access origin object by long name since long name is not unique, for example, we can set multiple pages to same one long name. So can use the following way to check all pages with long name to get its short name, then attach to this object by short name.
string getShortNameByLongName(string strLongName)
{
foreach(PageBase pg in Project.Pages)
{
string str = pg.GetLongName();
if(0 == str.Compare(strLongName))
{
out_str("Found!");
return pg.GetName();
}
}
out_str("Not found");
return "";
}
void attachByLongName(string strLongName)
{
string strShortName = getShortNameByLongName(strLongName);
Page pg(strShortName);
if(pg)
out_str("Long name is " + pg.GetLongName());
}
Iris