You can use similar idea than you can with column switcher with the exception that data filters are more complicated to manipulate. Below is one option
Names Default To Here(1);
dt = open("$SAMPLE_DATA/Big Class.jmp");
gb = dt << Graph Builder(
Size(525, 454),
Show Control Panel(0),
Variables(X(:weight), Y(:height), Overlay(:sex)),
Elements(Points(X, Y, Legend(9)), Line Of Fit(X, Y, Legend(11))),
Local Data Filter(
Add Filter(columns(:age), Display(:age, N Items(6)))
)
);
Summarize(dt, items = By(:age));
lbb = (Report(gb) << top parent)["Local Data Filter", ListBoxBox(1)];
pptx_loc = "$TEMP/powerpoint_test.pptx";
gb << Save Presentation(pptx_loc);
For(i = 1, i <= N Items(items), i++,
lbb << Clear Selection;
lbb << Set Selected(i);
gb << Save Presentation(pptx_loc, Append);
wait(0);
);
// Web(pptx_loc);
Write();
But have you consider using Page instead of Local Data Filter? It is much simpler
Names Default To Here(1);
dt = open("$SAMPLE_DATA/Big Class.jmp");
gb = dt << Graph Builder(
Show Control Panel(0),
Variables(X(:weight), Y(:height), Overlay(:sex), Page(:age)),
Elements(Points(X, Y, Legend(9)), Line Of Fit(X, Y, Legend(11)))
);
pptx_loc = "$TEMP/powerpoint_test.pptx";
gb << Save Presentation(pptx_loc);
// Web(pptx_loc);
Write();
-Jarmo