GetBinaryStorage
Get a binary storage as a tree
BOOL GetBinaryStorage( LPCSTR lpcszName, TreeNode & tn, int * pnSize = NULL )
true if found, false if not found.
EX1
void OriginObject_GetBinaryStorage_Ex1(string strStorageName = "SomeJunk") { Page pg = Project.Pages(); Tree tr; if(pg.GetBinaryStorage(strStorageName, tr)) out_tree(tr); else out_str("not found"); }
EX2
//print out all columns that has a storage in the Dataset and show the size. void GetBinaryStorage_ex2() { Worksheet wks = Project.ActiveLayer(); if( wks ) { foreach(Column col in wks.Columns) { DatasetObject ds(col); int nSize; ds.GetBinaryStorage(NULL, NULL, &nSize); if( nSize > 0 )// The size returned is total size of all binary storage objects when saved to OPJ. printf("%s (%d bytes)\n", col.GetName(), nSize); } } }
OriginObject::PutBinaryStorage, get_user_info, set_user_info
origin.h