cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
PhamBao
Level II

How to name the picture with variables

Dear JMP admin and users,

I would like to name the picture based on variables and I tried to follow some tips in this forum. However, the output files' name is undesried.

 

TCB = {"TCB218" ; "TCB219" ; "TCB220"};

For( i = 1, i <= N Items( TCB ), i++, 

	k = 1;

	dt << Select Where( :entitygroup3 == TCB[i] );
	TCB[i] = dt << Subset(
		Output Table( TCB[i] ),
		Selected Rows( 1 ),
		Selected columns only( 0 )
	);

	Summary = New Window( "OOC Summary",
		Graph Builder(
			Size( 1268, 656 ),
			Show Control Panel( 0 ),
			Variables(
				X( :KPP ),
				Group X( :DIE_TYPE ),
				Group X( :spc_chart_subset ),
				Group Y( :Bonder ),
				Color( :monitor_set_name )
			),
			Elements( Bar( X, Legend( 13 ), Label( "Label by Value" ) ) ),
			Local Data Filter(
				Close Outline( 1 ),
				Add Filter(
					columns( :chart_incontrol_flag ),
					Where( :chart_incontrol_flag == "N" )
				)
			),
			SendToReport(
				Dispatch(
					{},
					"KPP",
					ScaleBox,
					{Label Row(
						{Label Orientation( "Vertical" ), Tick Mark Style( "Short Mark" )}
					)}
				),
				Dispatch(
					{},
					"400",
					ScaleBox,
					{Legend Model( 13, Properties( 0, {Fill Color( 68 )} ) )}
				)
			)
		)
	);
	Summary << save picture( "<<<dir>>>\" || Char( TCB[i] ) || "_Summary" || ".png", "png" );

	k++;
)
;

I want the output name of the picture is TCB218_Summary.png , TCB219_Summary.png , TCB220_Summary.png, but the result is DataTable(-TCB218 8-)_Summary.png

Could you give me to some advice?
Sincerely

 

 

1 REPLY 1
jthi
Super User

Re: How to name the picture with variables

You seem to be overwriting strings in TCB list (on purpose?). It can be done like that, but then during the saving use TCB[i] << get name instead of Char(TCB[i]), but I would use use different list to keep the names and references.

-Jarmo