Subscribe Bookmark RSS Feed

Using Column Switcher deletes Object References?

brian_bircumsha

Community Trekker

Joined:

Dec 6, 2014

Hi All,

I often work with data with lots of outliers, and it is not currently practical to filter them all.  I want to display information using Graph Builder, with the Color switched by Column Switcher, and the scale of the color updated based on the selected column.

This works great for data from a single Column.  However, when I use Column Switcher, the Graph Builder object (gbObj) is deleted (log = deleted object reference[]).  Without the gbObj, I cannot re-scale the plot, and JMP throws the error: Send Expects Scriptable Object in access or evaluation of 'Send'

The code below illustrates this problem.


The reference to the window, cusRpt, is still valid, and I can get references to the OutlineBox of the Graph Builder.  Unfortunately, I don't know what DisplayBox to reference when scaling the color.  Does anyone know how to help with this issue?

Thank you,

Brian

/* Start Script */

dtData = Open( "$SAMPLE_DATA/Semiconductor Capability.jmp" );

///////////////////////////////////////////////////////////////////////////////////////

/*

setContoursGB(toWindow,LV,HV,numContours)

Function to set contours on a Graph Builder object = toWindow.

Contours are equally spaced between LV and HV, with numContours contours.

*/

///////////////////////////////////////////////////////////////////////////////////////

setContoursGB = Function({toWindow,LV,HV,numContours},

{toWindow,locContours,LV,HV,numContours,i},

  locContours = 1::numContours;

  For(i=1,i<=numContours,i++,

  locContours=LV+(i-1)*(HV-LV)/(numContours-1));

  toWindow << SendToReport(

  Dispatch(

  {},

  "400",

  ScaleBox,

  {Legend Model(

  1,

  Properties(

  0,

  {gradient(

  {Color Theme( "Cool to Warm" ),

  Label Levels(

  locContours

  ), Width( 12 )}

  )}

  ),

  Properties( 1, {Marker( "Pipe" ), Fill Color( 0 )} )

  )}

  ))

);

///////////////////////////////////////////////////////////////////////////////////////

/* Open Window */

custRpt = New Window( "Analysis",

  AnaNotesBox = Outline Box( "Analysis Notes",

  Text Box( "Information..." ),

  )

);

/* Append the Graph Builder Object (GB) */

custRpt << append(

gbObj = Graph Builder(

  Size( 570, 374 ),

  Show Control Panel( 0 ),

  Variables( X( :Wafer ID in lot ID ), Y( :SITE ), Color( :NPN1 ) ),

  Elements( Points( X, Y, Legend( 1 ), Jitter( 1 ) ) ),

  SendToReport(

  Dispatch(

  {},

  "400",

  ScaleBox,

  {Legend Model(

  1,

  Properties(

  0,

  {gradient( {Color Theme( "Cool to Warm" ), Width( 12 )} )}

  ),

  Properties( 1, {Marker( "Pipe" ), Fill Color( 0 )} )

  )}

  ),

  Dispatch( {}, "Graph Builder", FrameBox, {Marker Size( 5 )} )

  )

));

/* Open the Column Switcher */

csObj = gbObj << Column Switcher(

  NPN1,

  {NPN1, PNP1, PNP2, NPN2, PNP3, IVP1, PNP4, NPN3, IVP2, NPN4, SIT1, INM1,

  INM2, VPM1, VPM2, VPM3, PMS1, SNM1}

  );

/* Run through GB scaling exercises. */

popup = New Window("Message",

<<Modal, Text Box("Next, apply higher contrast coloring."),

SpacerBox(Size(0,20)),

HCenterBox(Button Box( "OK"))

);

setContoursGB(gbObj,110,120,11);

custRpt << Bring Window to Front;

popup = New Window("Message",

<<Modal, Text Box("Now, play with scale."),

SpacerBox(Size(0,20)),

HCenterBox(Button Box( "OK"))

);

setContoursGB(gbObj,105,115,11);

wait(1);

setContoursGB(gbObj,115,125,11);

wait(1);

setContoursGB(gbObj,113,117,11);

wait(1);

setContoursGB(gbObj,110,120,11);

/* Use Column Switcher. We're OK to here. */

popup = New Window("Message",

<<Modal, Text Box("Now, set Column Switcher to PNP1."),

SpacerBox(Size(0,20)),

HCenterBox(Button Box( "OK"))

);

csObj << Next;

/* Try to rescale GB, and things break. */

popup = New Window("Message",

<<Modal, Text Box("Try to re-scale Graph Builder."),

SpacerBox(Size(0,20)),

HCenterBox(Button Box( "OK"))

);

setContoursGB(gbObj,200,400,11);

/* End Script */

1 ACCEPTED SOLUTION

Accepted Solutions
ms

Super User

Joined:

Jun 23, 2011

Solution

I don't know why sending a <<Next message to the column switcher would break the platform object reference. A workaround could be to restore it after switching column. Try this:

csObj << Next;

gbObj = custRpt[Outline Box( "Graph Builder" )] << get scriptable object;

1 REPLY
ms

Super User

Joined:

Jun 23, 2011

Solution

I don't know why sending a <<Next message to the column switcher would break the platform object reference. A workaround could be to restore it after switching column. Try this:

csObj << Next;

gbObj = custRpt[Outline Box( "Graph Builder" )] << get scriptable object;