Your data filter is breaking it in JMP17
Names Default To Here( 1 );
dts = {};
Insert Into(dts, Open("$SAMPLE_DATA/Big Class.jmp"));
Insert Into(dts, Open("$SAMPLE_DATA/Big Class Families.jmp"));
nw = New Window("", tb = Tab Box());
For(i = 1, i <= N Items(dts), i++,
tb << Add(
Tab Page Box(Title(dts[i] << get name),
Data Filter Context Box(
H List Box(
/*dts[i] << Data Filter(
Local,
Add Filter(
columns(:sex)),
Mode(Select(1), Show(1), Include(1))
),*/
V List Box(
dts[i] << Fit Group(
Graph Builder(
Size(300, 300),
Show Control Panel(0),
Variables(X(:height), Y(:weight), Overlay(:sex)),
Elements(Line(X, Y, )), By(:age)
),
<<{Arrange in Rows(3)}
)
)
)
)
)
)
);
If you want to use << Fit Group (not really sure if it should be used as it's not meant for graph builder even though it works, you have few options: fix the titles after creation or create them in different manner.
This is most likely not very robust, but can give some idea of what you could do (using the values from column instead of relying on Where expression is most likely more robust option)
Names Default To Here( 1 );
dts = {};
Insert Into(dts, Open("$SAMPLE_DATA/Big Class.jmp"));
Insert Into(dts, Open("$SAMPLE_DATA/Big Class Families.jmp"));
nw = New Window("", tb = Tab Box());
For(i = 1, i <= N Items(dts), i++,
tb << Add(
Tab Page Box(Title(dts[i] << get name),
Data Filter Context Box(
H List Box(
dts[i] << Data Filter(
Local,
Add Filter(
columns(:sex)),
Mode(Select(1), Show(1), Include(1))
),
V List Box(
dts[i] << Fit Group(
Graph Builder(
Size(300, 300),
Show Control Panel(0),
Variables(X(:height), Y(:weight), Overlay(:sex)),
Elements(Line(X, Y, )), By(:age)
),
<<{Arrange in Rows(3)}
)
)
)
)
)
)
);
wait(0);
If(Word(1, JMP Version(), ".") == "17",
gb_obs = nw << XPath("//OutlineBox[@helpKey = 'Graph Builder']");
For Each({gb_ob}, gb_obs,
gb = gb_ob << Get Scriptable Object;
s = gb << get script;
w = Extract Expr(s, Where(Wild List()));
a = Substitute(Char(Arg(w, 1)), "==", "=");
gb << Title("Graph Builder " || Substr(a, 2))
);
);
Edit: The titles will break if data filter is used
-Jarmo