Hi - thanks for this, and I've verified that indeed if the outline boxes all have the same title, I can then open and close them simultaneously with a broadcasted open/close command. Unfortunately I do actually need them to have different titles, since once they're all closed, I can't easily tell which one(s) I specifically want to open.
I've found an example of one of my scripts working the way I want - but it relates to a situation in which I'm sending multiple copies of the Graph Builder output to the journal from within a for loop. With each run of the loop, I change the variables that the Graph Builder is plotting, and I then send a copy to the journal before running the next one. The relevant part of the script works like this:
dt = Open( "$SAMPLE_DATA/Owl Diet.JMP" );
yList = dt << get column names(string);
remove from(yList, nItems(yList));
show(yList);
// Create the chart as I want it to look for the first item on the list, and send a copy of it to the journal;
gb = Graph Builder(
Show Control Panel( 0 ),
Size( 600, 250 ),
Show Legend( 0 ),
Variables( X( :species ), Y( as column(column(dt, yList[1])) ) ),
Elements( Box Plot( X, Y, Legend( 6 ) ) ),
SendToReport(
Dispatch(
{},
"Graph Builder",
OutlineBox,
{Set Title( "Analysis of " || title case(yList[1]) )}
),
Dispatch( {}, "graph title", TextEditBox, {Set Text( "" )} ),
Dispatch( {}, "400", LegendBox, {Set Title( "" )} )
)
);
report(gb) << journal();
// Then run all the others in sequence by each time replacing the current Y variable with the next one, and adding them to the journal as we go;
for(i=2, i<=nItems(yList), i++,
gbb = report(gb);
gbb << Dispatch( {}, "Graph Builder", OutlineBox, {Set Title( "Analysis of " || title case(yList[i]) )} );
gbb[GraphBuilderBox(1)] << remove variable(2);
gbb[GraphBuilderBox(1)] << add variable({as column(column(dt, yList[i])), role("Y")});
gbb << journal()
);
// Finally, close the original chart window;
gb << close window;
The broadcasting command works in this instance, presumably because all the charts are actually called "Graph Builder" despite all having been given different labels - and it's this effect that I want to reproduce when I'm sending outline boxes to the journal that weren't created using the Graph Builder.
Any suggestions are welcome, though I may be asking the impossible.
Many thanks.