Hey @JosephMaurer
Welcome to the community! I'm not sure why Dispatch stuff is not working in the script. You want to customize a specific axis box, and for whatever reason, the scale box stuff is not working. I tried replacing the ScaleBox reference with the appropriate axis box reference, but that didn't work.
So, here's a good work around:
1. Get the control chart builder object as a report and save it as a variable.
2. Send a message to the appropriate axis box to update the max value and draw the ref line.
Here's an example with an X-bar and S chart. I found the appropriate axis box by looking in the tree structure.
ccb = Control Chart Builder(
Size( 522, 446 ),
Show Control Panel( 0 ),
Show Capability( 0 ),
Variables( Subgroup( :Group ), Y( :X ) ),
Chart( Position( 1 ) ),
Chart(
Position( 2 ),
Points( Statistic( "Standard Deviation" ) ),
Limits( Sigma( Standard Deviation ) )
),
SendToReport(
Dispatch(
{},
"X",
Axis Box( 3 ),
{Max( 7.82258064516129 ), Add Ref Line(
6,
"Dashed",
"Medium Dark Blue",
"",
2
)}
)
)
) << Report;
ccb[axisbox(3)] << Max(8);
ccb[axisbox(3)] << Add Ref Line(6,"Dashed","Medium Dark Blue","SDWL",2);
You can delete everything in the SendToReport function.
Hope that helps!
-- Cameron Willden