Clone
Clone the current page. The same operation with duplicate page in Origin.
Page Clone( DWORD dwCntrl = 0 )
The cloned page object.
EX1
// Clone worksheet, before calling make sure the worksheet exist void Page_Clone_ex1() { WorksheetPage wksPage("Book1"); WorksheetPage wksPage2 = wksPage.Clone(); if( !wksPage2 ) //Check if the worksheet exist printf("Fail to clone"); else printf("The name of clone page is %s\n", wksPage2.GetName()); }
EX2
// Clone Matrix, before calling make sure the matrixbook exist void Page_Clone_ex2() { MatrixPage matPg("MBook1"); MatrixPage matPg2 = matPg.Clone(); if( !matPg2 ) //Check if the matrix exist printf("Fail to clone"); else printf("The name of clone page is %s\n", matPg2.GetName()); }
EX3
// Clone graph, before calling make sure the graph exist void Page_Clone_ex3() { GraphPage gp("Graph1"); GraphPage gp2 = gp.Clone(CREATE_HIDDEN); //Clone the graph and set it as hidden if( !gp2 ) //Check if the hidden graph exist printf("Fail to clone"); else printf("The name of clone graph page is %s\n", gp2.GetName()); }
origin.h