Load
Load a Layer from a OGW/OGM file in an existing WorksheetPage object only
OriginObject Load( LPCSTR lpcszFile, LPCSTR lpcszOption = NULL )
the loaded object
EX1
//Before run please prepare a worksheet and add a layer named "Sample", then save it to user path with filename "Test.OGW" void OriginObject_Load_Ex1() { Worksheet wksActive = Project.ActiveLayer(); if(wksActive) { WorksheetPage wksPage = wksActive.GetPage(); string strFile = GetAppPath() + "Test.OGW"; if(strFile.IsFile()) { Worksheet wks; wks = wksPage.Load(strFile, "Sample"); } else out_str("Fail to find this file"); } }
Page::Create, Page::AddLayer
origin.h