You can use the GetN dialog. See GetNBox.h for examples. Like this one
#include <GetNBox.h>// must include this file as it is not included inside origin.h
void tt()
{
GETN_TREE(tr)
GETN_CHECK(FitAllCurves, "Fit All Curves", 0)
GETN_BEGIN_BRANCH(Fit, "Fitting Options")//Match GETN_END_BRANCH
GETN_CHECK(FixIntercept, "Fix Intercept", 0)
GETN_CHECK(FixSlope, "Fix Slope", 0)
GETN_END_BRANCH(Fit) //Match GETN_BEGIN_BRANCH
GETN_NUM(Points, "Points", 20)
if(GetNBox(tr, NULL, NULL, NULL, NULL))
out_tree(tr);
}
We will provide more examples on our wiki site, but in the mean time, you can search for "GetNBox(" in the OriginC\Originlab folder to see many many such kinds of codes. Many small examples are also given inside GetNBox.h
CP