Your error is in thinking that all of the images are in one report. Instead, there are 6 reports, each with one image.
Therefore your code needs to be changed to looping through a specified report and grabbing framebox(1) from each report.
dt = Open("C:\Program Files\SAS\JMP\17\Samples\Data\Quality Control\Braces.jmp");
vc = Variability Chart(
Y( :"# defects"n ),
Model( "Main Effect" ),
X( :Date ),
Variability Analysis(
:"# defects"n,
Show Range Bars( 0 ),
Show Cell Means( 0 ),
Std Dev Chart( 0 )
),
By( :Unit size )
);
subset_vc = New Window("Only some vc", vlis = V List Box());
frameboxes_to_subset = {1, 3, 5}; // Want to get when unit size = 4, 8, 12
vc_rpt = vc << Report;
//show(N Items( (vc_rpt << XPath( "//FrameBox" )) ));
//structure = vc_rpt << Show tree structure;
for(i = 1, i <= N Items(frameboxes_to_subset), i++,
vlis << append(vc_rpt[frameboxes_to_subset[i]][FrameBox(1)]);
);
I am also thinking that you might not want to be pulling just the FrameBox(), but instead pulling the PictureBox()
subset_vc = New Window("Only some vc", vlis = V List Box());
frameboxes_to_subset = {1, 3, 5}; // Want to get when unit size = 4, 8, 12
vc_rpt = vc << Report;
//show(N Items( (vc_rpt << XPath( "//FrameBox" )) ));
//structure = vc_rpt << Show tree structure;
for(i = 1, i <= N Items(frameboxes_to_subset), i++,
vlis << append(vc_rpt[frameboxes_to_subset[i]][PictureBox(1)]);
);
Jim