SaveAs
Saves (Serializes) an OriginObject into an Orgin recognized file type.
BOOL SaveAs( LPCSTR lpcszFileName, DWORD dwCtrl = 0 )
TRUE if saving succeeds else FALSE.
EX1
// Save a worksheet in various levels of completeness void OriginObject_SaveAs_Ex1() { string strPath = GetAppPath(); // Gets the User folder WorksheetPage Wkspg = Project.Pages(); if(Wkspg) { Worksheet wks = Wkspg.Layers(0); if(wks) { wks.SaveAs(strPath + "MyTemplateNoDataNoInfo", 0); // Save as an OTP worksheet template without data or storage wks.SaveAs(strPath + "MyTemplateNoDataWithInfo", OOSAS_STORAGE); // Save as an OTP worksheet template with storage, but no data wks.SaveAs(strPath + "MyWindowWithData", OOSAS_DATA); // Save as an OGW file with data, but no storage wks.SaveAs(strPath + "MyWindowWithDataAndInfo", OOSAS_DATA | OOSAS_STORAGE); // Save as an OGW file complete with data and storage } } }
Currently works for Worksheet's only
origin.h