Adding a User Tree to Worksheet

Version Info

Minimum Origin Version Required: Origin 8 SR0


The following example to show how to add user parameter tree to one Origin window. Right click the title of window and choose Show Organizer to see newly added tree in User Tree branch.

void OriginObject_PutBinaryStorage_Ex1(string strPageName = "Book1")
	Page pg = Project.Pages(strPageName);
		string strStorageName = "TREE"; // the name of user tree must be TREE
		Tree tr;		
		tr.Param1.Company.strVal = "ACME Corp";
		tr.Param1.operator.strVal = "Joe Smith";
		tr.Param1.DAQ.start.dVal = 0;
		tr.Param1.DAQ.stop.dVal = 0.5;
		tr.Param2.Test.strVal = "Just a test";
		pg.PutBinaryStorage(strStorageName, tr); 
		Tree trTest;
		pg.GetBinaryStorage(strStorageName, trTest);
		printf("Not this page named %s in project\n", strPageName);