cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Submit your abstract to the call for content for Discovery Summit Americas by April 23. Selected abstracts will be presented at Discovery Summit, Oct. 21- 24.
Discovery is online this week, April 16 and 18. Join us for these exciting interactive sessions.
Choose Language Hide Translation Bar
Yngeinstn
Level IV

Update a box with graphs

I am having trouble trying to reconcile how to update boxes with graphs.

In the beginining, I have a window open has does everything I need to do as far as data selection based on dates and then a summary table of wafers inside that date range. When I click on a "load test data" button it executes the sql script to go out and pul in all the test data being requested. After the table is open i want to execute 5 separate graphs and 5 separte distributions which will then tie into the Semiconductor Took Kit to get me yield information.

 

As i mentioned, the graph boxes are placed in 1 of 4 tabs, are empty and for now is just used a a place holder.  I would also like to put in a local data filter but that is the next process in this evolution. In addition this, I would like to learn how to clear these boxes when a new set of wafer(s) is selected.

 

I applogize in advance so to what is included as far as any jsl. I am trying to figure a way of consolodating these scripts to use just tables and not SQL quieries.

 

credit to ian_jmp, txnelson and many others for the help so far

2 ACCEPTED SOLUTIONS

Accepted Solutions
txnelson
Super User

Re: Update a box with graphs

What I normally do when attempting an update like you are looking to do, is to simply delete the object I am going to replace, and then build the new object, and append it to the location where you deleted the the original object.  I have modified your script to illustrate this method.  I only modified one of your graph boxes, but I think you will get the idea.  Just run the script, and then click on the "Click Here When Finished" button


Names Default to Here( 1 );

Close All( Data Tables, No Save );
Close All( Reports );
Clear Log();
Close All( journals, no save );
Clear Symbols();

/* -----------------------------------------------------------*/
/* Initializes Date Selection	 					          */
/* -----------------------------------------------------------*/

sqlstartA = Today();
sqlendA = Today();
sqlstart = Format( sqlstartA, "yyyy-mm-dd" );
sqlend = Format( sqlendA, "yyyy-mm-dd" );


/************************************************************************************************************************************************/
/*                                                                         	  																	*/
/* ---------------------------------------------------------[START TEST DATA ANALYSIS] ----------------------------------------------------	*/
/*                                                                        																		*/
/************************************************************************************************************************************************/

hay = New Window( "Test Database Tools",
	V List Box(
		V List Box(
			Text Box( "Welcome to the Test Database",
				<< Set Font Size( 20 ),
				<< Set Width( 1920 ),
				<< Justify Text( "Center" )
			),
			Spacer Box(
				Size( 10, 15 )
			),
			H List Box( 
				bb = Border Box( Left( 15 ), Right( 10 ), Top( 10 ), Bottom( 10 ), Sides( 15 ),
					V List Box(
						lineup1 = Lineup Box(
							N Col( 1 ),
							V List Box(
								lineup2 = Lineup Box(
									N Col( 1 ),
									Text Box( "Select Desired Test Dates",
										<< Set Font Size( 20 ),
										<< Justify Text( "Center" )
									),
									Spacer Box(
										Size( 5, 15 )
									),
									H Splitter Box(
										Border Box( Left( 15 ), Right( 10 ), Top( 10 ), Bottom( 10 ), Sides( 15 ), 	StartDate = Calendar Box(
											<< Set Function(
												Function(
													{f1},
													sqlStartA = StartDate << Get Date()
												)
											)
										)
									),
									Border Box(	Left( 15 ), Right( 10 ), Top( 10 ), Bottom( 10 ), Sides( 15 ),
										EndDate = Calendar Box(
											<< Set Function(
												Function(
													{f2},
													sqlendA = EndDate << Get Date()
												)
											)
										)	
									)
								)
							)
						),
						Spacer Box(
							Size( 5, 15 )
						),
						bb1 = Button Box( "Click Here When Finished",
							sqlstart = Format( sqlstartA, "yyyy-mm-dd" );
							sqlend = Format( sqlendA, "yyyy-mm-dd" );
							Show( sqlstart, sqlend );
							/*lineup1 << Append(
								V List Box(
									loaddata = Button Box( "Load Test Data", 
										doListChoice; // converts single lot to multiple for purpoose of sql data pull
										doLoadWafer; // sql scipt to pull in test data
									),
									Spacer Box( 
										Size( 5, 15)
									),
									Panel Box( "Select Wafer(s)",
										doLotList,
										Lotlistbox = Check Box( LotList, Beep() ), // lot list based on date selection
										LotListBox << Get Selected;
									)
								)
							),
							gbirl << Append( gb );*/
							dt = open( "$SAMPLE_DATA/big class.jmp",invisible);
							gbirl << delete;
							gbirl = vlistbox(dt<<bivariate(x(:height),y(:weight)));
							gbirlvlb << append(gbirl);
						),
						Spacer Box(
								Size( 5, 15 )
						)
					)
				)
			),
// The below scripts are place holders for now
				Tab Box(
					"Graph Plot",
					V Splitter Box(
						H Splitter Box(
						gbirlvlb = v list box( gbirl =	Graph Box() ),
						gbgain = Graph Box(),
						gborl =	Graph Box()
						),
						H Splitter Box(
						gbnf = Graph Box(),
						gbgaindb = Graph Box()
						)
					),
					"Distributions",
						Text Box( "Place"),
					"Wafer Map",
						Text Box( "Place" )
					
				)
			)
		)
	)
);
Jim

View solution in original post

txnelson
Super User

Re: Update a box with graphs

I believe that the comma following at the end of  line 65 needs to be removed.

     

);

 

Jim

View solution in original post

6 REPLIES 6
txnelson
Super User

Re: Update a box with graphs

What I normally do when attempting an update like you are looking to do, is to simply delete the object I am going to replace, and then build the new object, and append it to the location where you deleted the the original object.  I have modified your script to illustrate this method.  I only modified one of your graph boxes, but I think you will get the idea.  Just run the script, and then click on the "Click Here When Finished" button


Names Default to Here( 1 );

Close All( Data Tables, No Save );
Close All( Reports );
Clear Log();
Close All( journals, no save );
Clear Symbols();

/* -----------------------------------------------------------*/
/* Initializes Date Selection	 					          */
/* -----------------------------------------------------------*/

sqlstartA = Today();
sqlendA = Today();
sqlstart = Format( sqlstartA, "yyyy-mm-dd" );
sqlend = Format( sqlendA, "yyyy-mm-dd" );


/************************************************************************************************************************************************/
/*                                                                         	  																	*/
/* ---------------------------------------------------------[START TEST DATA ANALYSIS] ----------------------------------------------------	*/
/*                                                                        																		*/
/************************************************************************************************************************************************/

hay = New Window( "Test Database Tools",
	V List Box(
		V List Box(
			Text Box( "Welcome to the Test Database",
				<< Set Font Size( 20 ),
				<< Set Width( 1920 ),
				<< Justify Text( "Center" )
			),
			Spacer Box(
				Size( 10, 15 )
			),
			H List Box( 
				bb = Border Box( Left( 15 ), Right( 10 ), Top( 10 ), Bottom( 10 ), Sides( 15 ),
					V List Box(
						lineup1 = Lineup Box(
							N Col( 1 ),
							V List Box(
								lineup2 = Lineup Box(
									N Col( 1 ),
									Text Box( "Select Desired Test Dates",
										<< Set Font Size( 20 ),
										<< Justify Text( "Center" )
									),
									Spacer Box(
										Size( 5, 15 )
									),
									H Splitter Box(
										Border Box( Left( 15 ), Right( 10 ), Top( 10 ), Bottom( 10 ), Sides( 15 ), 	StartDate = Calendar Box(
											<< Set Function(
												Function(
													{f1},
													sqlStartA = StartDate << Get Date()
												)
											)
										)
									),
									Border Box(	Left( 15 ), Right( 10 ), Top( 10 ), Bottom( 10 ), Sides( 15 ),
										EndDate = Calendar Box(
											<< Set Function(
												Function(
													{f2},
													sqlendA = EndDate << Get Date()
												)
											)
										)	
									)
								)
							)
						),
						Spacer Box(
							Size( 5, 15 )
						),
						bb1 = Button Box( "Click Here When Finished",
							sqlstart = Format( sqlstartA, "yyyy-mm-dd" );
							sqlend = Format( sqlendA, "yyyy-mm-dd" );
							Show( sqlstart, sqlend );
							/*lineup1 << Append(
								V List Box(
									loaddata = Button Box( "Load Test Data", 
										doListChoice; // converts single lot to multiple for purpoose of sql data pull
										doLoadWafer; // sql scipt to pull in test data
									),
									Spacer Box( 
										Size( 5, 15)
									),
									Panel Box( "Select Wafer(s)",
										doLotList,
										Lotlistbox = Check Box( LotList, Beep() ), // lot list based on date selection
										LotListBox << Get Selected;
									)
								)
							),
							gbirl << Append( gb );*/
							dt = open( "$SAMPLE_DATA/big class.jmp",invisible);
							gbirl << delete;
							gbirl = vlistbox(dt<<bivariate(x(:height),y(:weight)));
							gbirlvlb << append(gbirl);
						),
						Spacer Box(
								Size( 5, 15 )
						)
					)
				)
			),
// The below scripts are place holders for now
				Tab Box(
					"Graph Plot",
					V Splitter Box(
						H Splitter Box(
						gbirlvlb = v list box( gbirl =	Graph Box() ),
						gbgain = Graph Box(),
						gborl =	Graph Box()
						),
						H Splitter Box(
						gbnf = Graph Box(),
						gbgaindb = Graph Box()
						)
					),
					"Distributions",
						Text Box( "Place"),
					"Wafer Map",
						Text Box( "Place" )
					
				)
			)
		)
	)
);
Jim
Yngeinstn
Level IV

Re: Update a box with graphs

Thank you Mr. Nelson. I am going to try this and get back to you.. Happy Holidays to you and your's..

d
Yngeinstn
Level IV

Re: Update a box with graphs

I have a quick follow-up question. When i run the script that includes my sql script (when i select "Click Here When FInished") that window appends with wafer list. That is working as intended however It appears it is stopping right before the gbirl << delete;

 

hay = New Window( "Test Database Tools",
	V List Box(
		V List Box(
			Text Box( "Welcome to the Test Database",
				<< Set Font Size( 20 ),
				<< Set Width( 1920 ),
				<< Justify Text( "Center" )
			),
			Spacer Box(
				Size( 10, 15 )
			),
			H List Box( 
				bb = Border Box( Left( 15 ), Right( 10 ), Top( 10 ), Bottom( 10 ), Sides( 15 ),
					V List Box(
						lineup1 = Lineup Box(
							N Col( 1 ),
							V List Box(
								lineup2 = Lineup Box(
									N Col( 1 ),
									Text Box( "Select Desired Test Dates",
										<< Set Font Size( 20 ),
										<< Justify Text( "Center" )
									),
									Spacer Box(
										Size( 5, 15 )
									),
									H Splitter Box(
										Border Box( Left( 15 ), Right( 10 ), Top( 10 ), Bottom( 10 ), Sides( 15 ), 	StartDate = Calendar Box(
											<< Set Function(
												Function(
													{f1},
													sqlStartA = StartDate << Get Date()
												)
											)
										)
									),
									Border Box(	Left( 15 ), Right( 10 ), Top( 10 ), Bottom( 10 ), Sides( 15 ),
										EndDate = Calendar Box(
											<< Set Function(
												Function(
													{f2},
													sqlendA = EndDate << Get Date()
												)
											)
										)	
									)
								)
							)
						),
						Spacer Box(
							Size( 5, 15 )
						),
						bb1 = Button Box( "Click Here When Finished",
							sqlstart = Format( sqlstartA, "yyyy-mm-dd" );
							sqlend = Format( sqlendA, "yyyy-mm-dd" );
							Show( sqlstart, sqlend );
							lineup1 << Append(
								V List Box(
									loaddata = Button Box( "Load Test Data", 
										doListChoice; // converts single lot to multiple for purpoose of sql data pull
										doLoadWafer; // sql scipt to pull in test data
									),
									Spacer Box( 
										Size( 5, 15)
									),
									Panel Box( "Select Wafer(s)",
										doLotList,
										Lotlistbox = Check Box( LotList, Beep() ), // lot list based on date selection
										LotListBox << Get Selected;
									)
								)
							),
//							gbirl << Append( gb ); 
							gbirl << delete; // Stops right before it gets to this step in the code (assumption)
//							dt = open( "$SAMPLE_DATA/big class.jmp",invisible); // Your inserted script

// Replaced your Bivariate with my Graph Plot

							gbirl =  V List Box( 
									::dt_testdata_ss << Graph Builder(
										Show Control Panel( 0 ),
										Show Legend( 0 ),
										Variables(
											X( :FREQ_GHz ),
											Y( :IRL ),
											Group X( :wafer_number ),
											Overlay( :RowCol )
										),
										Elements( Smoother( X, Y, Legend( 11 ) ) ),
										Local Data Filter(
											Add Filter(
												columns( :wafer_number, :trmode, :channel ),
												Display( :channel, Check Box Display )
											)
										)
									)
								);
							gbirlvlb << append(gbirl);
						),
						Spacer Box(
								Size( 5, 15 )
						)
					)
				)
			),
// The below scripts are place holders for now
				Tab Box(
					"Graph Plot",
					V Splitter Box(
						H Splitter Box(
							gbirlvlb = V List Box( 
								gbirl =	Graph Box()
							),
							gbgain = Graph Box(),
							gborl =	Graph Box()
						),
						H Splitter Box(
							gbnf = Graph Box(),
							gbgaindb = Graph Box()
						)
					),
					"Distributions",
						Text Box( "Place"),
					"Wafer Map",
						Text Box( "Place" )
					
				)
			)
		)
	)
);
txnelson
Super User

Re: Update a box with graphs

I believe that the comma following at the end of  line 65 needs to be removed.

     

);

 

Jim
Yngeinstn
Level IV

Re: Update a box with graphs

I ran this in the debug mode and i get a "The display box 'ButtonBox' does not recognize the message 'Glue'; perhaps you mean one of these: <<Get <<Get Style <<Style <<Get Picture." at step (gbirl << delete; // Stops right before it gets to this step in the code (assumption)).

The only 'Get' is LotListBox << Get Selected;

Thanks again for you help
Yngeinstn
Level IV

Re: Update a box with graphs

I just ended up rewriting the script to make sure that i had all the semi-colons and comma's where in the correct place.

Thanks