Easiest would be if you can get the reference to the Graph Builder. You can for example use << Get Scriptable Object after you have the reference to the outline box
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
nw = New Window("",
Graph Builder(
Variables(X(:height), Y(:weight)),
Elements(Points(X, Y), Smoother(X, Y))
);
);
gb = (nw[OutlineBox("Graph Builder")] << Get Scriptable Object);
fb = Report(gb)[FrameBox(1)];
fb << Frame Size(800,200);
Or in some cases you might be able to find framebox directly from window
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
nw = New Window("",
Graph Builder(
Variables(X(:height), Y(:weight)),
Elements(Points(X, Y), Smoother(X, Y))
);
);
nw[FrameBox(1)] << Frame Size(800,200);
And finally XPath
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
nw = New Window("",
Graph Builder(
Variables(X(:height), Y(:weight)),
Elements(Points(X, Y), Smoother(X, Y))
);
);
(nw << XPath("//FrameBox")) << Frame Size(800,200);
You can get reference to the window using Current Window(), but it is a bit annoying to use from script window and works much better from toolbar/shortcut/add-in.
-Jarmo