Subscribe Bookmark RSS Feed

ScaleBox Subscript not found

bents

Community Trekker

Joined:

May 28, 2013

The following code is a print out of the code created dynamically when graphing two different columns with respect to Test Time.  For some reason, the code ignores my attempt to have fixed scales on the graph as it prints this error

Cannot find ScaleBox[ "Subscript" ] at {}

Cannot find ScaleBox[ "Subscript" ] at {}

I don't know what I'm doing wrong so any help will be appreciated.  Even if you can't point out what is wrong with my code, just saying what causes that to print would be helpful.  The meanlist contains the means of the columns being graphed and sdlist contains the standard deviations of the columns being graphed.  The list filterlist has the names of the columns being graphed.

gb = Graph Builder(

      Show Control Panel( 0 ),

      Show Legend ( 0 ),

      Variables(

            X( :Test Time ),

            Y( column(filterlist[1]) ),

            Y( column(filterlist[2]) )

      ),

      Elements( Position( 1, 1 ),

            Line( X, Y, Legend( 2+1 ), Row order( 0 ), Summary Statistic( "Mean" ) )

      ),

      Elements( Position( 1, 2 ),

            Line( X, Y, Legend( 2+2 ), Row order( 0 ), Summary Statistic( "Mean" ) )

      ),

      SendToReport(

            Dispatch(

                  {},

                  "graph title",

                  Text Edit Box,

                  {Set Text ( char(SerialNumberBox<<Get()) || " at " || temperatureArray[3] || " and Zero Pressure" )}

            ),

            Dispatch(

                  {},

                  filterlist[1],

                  ScaleBox,

                  {Min( meanlist[1]-3*sdlist[1] ), Max( meanlist[1]+3*sdlist[1] ), Inc( 0.5*sdlist[1] ), Minor Ticks( 1 ) }

            ),

            Dispatch(

                  {},

                  filterlist[2],

                  ScaleBox,

                  {Min( meanlist[2]-3*sdlist[2] ), Max( meanlist[2]+3*sdlist[2] ), Inc( 0.5*sdlist[2] ), Minor Ticks( 1 ) }

            );

      );

);

gb_rpt = report(gb);

gb_rpt[LegendBox(1)] << delete;

gb_rpt[PictureBox(1)] << Journal Window;

gb << Close Window( nosave );

2 REPLIES
bents

Community Trekker

Joined:

May 28, 2013

I have figured it out.  It does not like me using the references to the values.  I changed my code to evaluate the values of the lists while making the script so that it looks like this when it is executed

gb = Graph Builder(

      Show Control Panel( 0 ),

      Show Legend ( 0 ),

      Variables(

            X( :Test Time ),

            Y( column(filterlist[1]) ),

            Y( column(filterlist[2]) )

      ),

      Elements( Position( 1, 1 ),

            Line( X, Y, Legend( 3 ), Row order( 0 ), Summary Statistic( "Mean" ) )

      ),

      Elements( Position( 1, 2 ),

            Line( X, Y, Legend( 4 ), Row order( 0 ), Summary Statistic( "Mean" ) )

      ),

      SendToReport(

            Dispatch(

                  {},

                  "graph title",

                  Text Edit Box,

                  {Set Text ( char(SerialNumberBox<<Get()) || " at " || temperatureArray[3] || " and Zero Pressure" )}

            ),

            Dispatch(

                  {},

                  Filtered PV_003,

                  ScaleBox,

                  {Min( -0.13312834642215 ), Max( 0.0168978817756855 ), Inc( 0.012502185683153 ), Minor Ticks( 1 ) }

            ),

            Dispatch(

                  {},

                  Filtered SV_003,

                  ScaleBox,

                  {Min( -56.0293375797183 ), Max( -46.0881139893053 ), Inc( 0.828435299201087 ), Minor Ticks( 1 ) }

            );

      );

);

gb_rpt = report(gb);

gb_rpt[LegendBox(1)] << delete;

gb_rpt[PictureBox(1)] << Journal Window;

gb << Close Window( nosave );

XanGregg

Staff

Joined:

Jun 23, 2011

I think you've figured out the issue of the arguments not evaluating. Sometimes you can work-around that by using things like Expr and Eval Expr.