I'm attempting to loop through a variable list of tools (ChamberTool or Cham) to create a list. Then using that list I create a contour of the data by date where each chamber is a separate tab on a tab box window. I've done each of these things independently but my particular issue is creating a tab for each tool from this variable list. Maybe my approach is way off but here is my script.
First, here are the two bits of script I have that work. I hand wave over the scripting of the parts that I already know how to do and to keep this post more brief and not detract from my main problem statement.
ContourG = dt << Contour stuff here;
Graph = new window("Contours", tab box(
"Tab Name Here", (vlistbox(ContourG)),
));
But when i try to run a for loop i am completely broken.
Cham = Associative Array(Column(dt_stacked, "Chamber") << Get Values) << Get Keys;Associative Array(Column(dt_stacked, "Chamber")<< Get Values)<<Get Keys;
Graph = new window("Contours", tab box(
For (x=1, x<=nitems(Cham), x++,
ChamberTool= Cham[x];
G_Contour = Cham[x];
ContourG = dt_stacked << Contour Plot(
X( :XLoc, :YLoc ), Y( :Thickness ),
Where( :Chamber == ChamberTool ), By(:Date),
Chart Parameter stuff here, SendToReport( other stuff here) ),
ChamberTool, (vlistbox(ContourG)),
)));