Subscribe Bookmark RSS Feed

How to increment pathname (Save Picture)?


Community Trekker


Jun 23, 2011

Hi, I need some help. Using JSL, how does one increment a pathname string?

For example, I am plotting out multiple JMP charts using Variability Chart (4 charts total). Essentially, JMP loops thru the Variability Chart code 4 times to make the plots. I want to save each chart as a unique .PNG file each time using Save Picture:

Variability Chart... (creates 4 similar charts)
Save Picture( "C:\Documents and Settings\myname\Desktop\Chart.PNG" , PNG );

What I need it to do, is save Chart1.PNG, Chart2.PNG, Chart3.PNG, Chart4.PNG. What I get now is simply Chart.PNG as it overwrites each one and I'm left with only the last chart of course. I've tried multiple things to try and get the pathname string to increment but no luck. Any ideas?

Super User


Jun 23, 2011

You can use a variable that sets an unique filename in each loop.