Well, this is not standard C++, as the whole Tree thing in Origin C is an extension that make codes much easier to read with the a.b.c type of notation to directly go down to a particular tree node.
In Origin 8, the GetFormat command will allow the tree tagName to be used,
Tree GetFormat(DWORD dwPropertiesFilter = FPB_ALL, DWORD dwObjFilter = FOB_ALL, BOOL bGetTagNames = TRUE);
so the following code will become possible
void test_set_as_bold()
{
Page pg = Project.Pages();
Tree tr;
tr = pg.GetFormat(FPB_STYLE_FONT, FOB_ALL, true);
if(tr.Root.Page.Layers)
tr.Root.Page.Layers.Remove(); // remove detailed setttings on each layer
out_tree(tr);
tr.Root.Global.Bold.nVal = 1;
pg.ApplyFormat(tr);
}
CP