cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
The Discovery Summit 2025 Call for Content is open! Submit an abstract today to present at our premier analytics conference.
See how to use to use Text Explorer to glean valuable information from text data at April 25 webinar.
Choose Language Hide Translation Bar
newbie_4
Level II

How do I Print current date as image (jpeg file) and save on a network share drive

Hello,

I am creating bunch of variability plots in a for loop and saving each plot with a unique name using the code below. However, I want to either be able to 1) add a current time stamp (when script runs) to each of these plots or 2) instead of displaying date on each plot, just save a seperate jpeg file that just has date time stamp. Can anyone suggest how can I do that.

 

 

dt = Current Data Table();

dt << New Column( "OVER_UNDER", character, nominal, formula( :MEASURED LAYER || "_" || :UNDER LAYER ) );
overunder = Associative Array( dt:OVER_UNDER << Get Values ) << Get Keys;
Create Directory( "\\drive location\folder" );
For( i = 1, i <= N Items( overunder ), i++,
	win = New Window( "window",
		var = dt << Variability Chart(
			Y( :VALUE ),
			X( :ROUTE, :OPERATION, :PRODUCT, :ANALYTICAL_ENTITY, :DATA_COLLECTION_TIME ),
			Connect Cell Means( 1 ),
			Std Dev Chart( 0 ),
			Points Jittered( 1 ),
			AIAG Labels( 0 ),
			Where( :OVER_UNDER == overunder[i] ),
			By( :PARAMETER, :OVER_UNDER ),
			SendToReport(
				Dispatch(
					{"Variability Chart for VALUE"},
					"Variability Chart",
					FrameBox,
					{Row Legend(
						:Current Tool,
						Color( 1 ),
						Color Theme( "JMP Default" ),
						Marker( 0 ),
						Marker Theme( "" ),
						Continuous Scale( 0 ),
						Reverse Scale( 0 ),
						Excluded Rows( 0 )
					)}
				)
			)
		)
	);

	win << save picture( "\\share drive\folder\" || overunder[i] || "_SPC.jpeg", "jpeg" );
	win << close window;
);

 

1 ACCEPTED SOLUTION

Accepted Solutions
Craige_Hales
Super User

Re: How do I Print current date as image (jpeg file) and save on a network share drive

tb = Text Box( Char( Format( Today(), "dd-mm-yyyy" ) ), <<setFontSize( 48 ) );
pic = tb << getpicture;
pic << saveImage( "$temp/dateString.png", "png" );


Open( "$temp/dateString.png" );

a picture of todaya picture of today

Craige

View solution in original post

3 REPLIES 3
Craige_Hales
Super User

Re: How do I Print current date as image (jpeg file) and save on a network share drive

tb = Text Box( Char( Format( Today(), "dd-mm-yyyy" ) ), <<setFontSize( 48 ) );
pic = tb << getpicture;
pic << saveImage( "$temp/dateString.png", "png" );


Open( "$temp/dateString.png" );

a picture of todaya picture of today

Craige
Craige_Hales
Super User

Re: How do I Print current date as image (jpeg file) and save on a network share drive

Or this

Preference for adding date to outputPreference for adding date to output

Craige
newbie_4
Level II

Re: How do I Print current date as image (jpeg file) and save on a network share drive

This works exactly the way I wanted. Thanks so much Craige_Hales. Appreciate your help !

Recommended Articles