Hi Dimitry,
1)
In the OriginObject class, four methods are provided for accessing and modifying Workbook Long and Short names. They are GetName, GetLongName, SetName and SetLongName.
2)
The default template name is "Origin". If no changes have been done on this default template, the following code can be used to create a new workbook by using "Origin" template.
void testCreate()
{
WorksheetPage wp;
wp.Create("Origin");
}
You can refer to Create method for more information.
3)
Every worksheet has its own workbook, if you want to "attach" one worksheet to another workbook, you can use the AddLayer method to add the current worksheet to another workbook, and then use the Destroy method to remove the current worksheet. For example:
void testAddLayer()
{
Worksheet wks = Project.ActiveLayer(); // get the active worksheet
WorksheetPage wp;
wp.Create("Origin"); // create a new workbook
wp.AddLayer(wks); // add the active worksheet to the newly created workbook
wks.Destroy(); // destroy the active worksheet
}
Penn