A picture is worth...
Generating graphic images from CHARTrunner
Software development manager
Process charts are meant not only to be analyzed, but also to be shared. If they can be saved only in the originating program, the sharing capability may be somewhat limited. If, however, that software can save charts as graphics images, they can be easily viewed by others through a web browser or other program.
CHARTrunner charts can indeed be saved, stored, and sent as graphic image files, using .JPG .PNG, .BMP, or .EMF formats. Internet Explorer can render .JPG and .PNG files immediately accessible, and other programs can access .BMP and .EMF files.
Generating a chart image file works the same way as viewing a chart on the screen – except the output goes to a disk file. The disk file will contain a snapshot of what the chart looks like when the file is generated. Note that an hour from now or even next week, this chart file will look the same; it does not get updated with new data unless CHARTrunner generates the chart image file again. By contrast, CHARTrunner itself always updates data, to assure that the latest data is presented, while saving as a graphics image is like taking a photo of your children. Little Alice will always be three years old in the photo, while in person she may now be a gangly middle schooler.
Depending on how current a chart needs to be when it is shared, it might be sufficient to update chart image files once a week. In other cases, the chart images must be much more current in order to be considered relevant and useful. In any case, setting up a chart image generating system is easy with CHARTrunner.
Step one is to decide where chart images will be saved. This will often be a network drive that all potential chart viewers can access. Whenever possible, this should be based on a universal naming convention (UNC) path, since users’ computers may be mapped differently. (Drive J may be mapped for one user as drive K, for example.) Instead, a UNC path might look like this:
The next step involves generating a chart image, then saving it to this folder. In CHARTrunner, click once to highlight a chart. Right-click to display the menu, and select Save chart as image. A dialogue box will allow you to select the file format and location for the file. In the Image file field, type in the UNC path to the storage destination. The dialogue may look like this:
Simply click OK to generate the chart image.
To assure that the image can be viewed, go to someone else’s PC and bring up the web browser on that computer. Type in the UNC address used to store the chart, and the chart image will be displayed. (If this doesn’t work, it may be that the user does not have access to the folder; see MIS for help here.)
The above steps must be taken before a more automated approach can be taken.
Using a chart workspace
In most cases, you will want to generate several chart images in a batch. Although you could do this one chart at a time, a better solution is to set up a workspace containing all the charts for which you want to generate images. A workspace is a named collection of charts. On the main form in CHARTrunner, click on the Workspaces button on the left side of the screen. To add a new chart workspace, click on the toolbar button to add a new chart (it looks like a plus sign).
Use the workspace form to add all of the charts you want in this batch. Consider making multiple workspaces where each one has a specific use. For example, one might imagine these workspaces:
Click OK to save the workspace. These workspaces will allow you to generate many chart images with a single command.
Save chart images from a workspace manually
After you’ve established a workspace, you will want to test it. On the main form, click once to select one of the workspaces. Right click to bring up the menu and then select: Save all chart images to a specified folder. A dialog box will be displayed in order to select a folder. You can type in a folder location or browse for it. We recommend entering a UNC name as previously described. An example follows:
When you click OK, CHARTrunner creates a chart image file for each chart in the workspace. If you have many charts, this may take some time.
At this point, ensure that the chart image files have been generated. Use Windows Explorer to browse to the target folder. You should see a chart image file for each chart contained in the workspace. Once you know the address for any one of these files, you can use a web browser to view the chart. You can even bookmark each chart so these show up in your Favorites list in the web browser.
The next step is to set up a desktop icon that will generate these chart images when you double-click the icon. To do this, use a feature in CHARTrunner called Command Line Parameters. You can read more background about this by searching for Command Line in the CHARTrunner help system.
Make a copy of the icon you use to start CHARTrunner. Do this by right-click dragging the CHARTrunner icon to a space right next to it on the desktop. A menu will be displayed; select Copy here. This simply copies the icon that starts CHARTrunner. For greater clarity, rename the icon to something like Generate chart images. Rename is on the right-click menu for the icon.
Next, change the properties of this icon to specify a command line parameter. Right-click on the icon, and select Properties; a dialogue will be displayed similar to this:
In the Target field, you will see something like this:
C:\Program Files\PQ Systems\CHARTrunner 2.5\ChRun25.exe
We will be adding information or parameters to the end of this text. The parameters will tell CHARTrunner to do a specific task when it is started by this icon.
The following must be added to the end of what is in the Target field:
/T PNG /O c:\temp /I C:\MyChart.crw
In this case, you will make some changes. Instead of c:\temp, use something like this:
Instead of c:\MyChart.crw, use the full path to the workspace file that you defined in previous steps. Here is what these command line parameters mean:
/T PNG – the type of graphic file I want is PNG.
/O – the following is where I want the Output.
/I – generate chart image files.
Click OK to save the new Properties for this icon. To test the icon, double-click on it. It should start CHARTrunner and generate new image files for all the charts in your workspace. If this does not work, look carefully at the command line parameters that you have typed into the Properties dialogue box; they must be precise. Spelling, case, and spaces matter.
You now have an icon that you can double-click and all your chart images get updated. Since most people don’t want to have to assign someone to remember to double-click this icon every week or every month, the next step is to use the Windows task scheduler to automate this one step further.
Under Windows XP, follow these steps:
Start/Programs/Accessories/System tools/Add Scheduled Task
This will guide you through a wizard that asks you which program to run, how often, and several other things. At this end of this, check the box that says Open Advanced options. This is where your practice at defining the icon (above) will help you, as you need to specify command line parameters for this scheduled task. These will be exactly as they were for the icon.
While it may seem tedious to set up and test this method, and to assure that it works, you will see that the payoff is immediate and dramatic. Any non-CHARTrunner users that you specify can now view relatively current images of charts on key metrics.
You learned at an early age that sharing is important. Inviting those who need to see your charts to be a part of this sharing process may indeed be critical to process analysis in your organization.
2008 PQ Systems.
Please direct questions or problems regarding this web site to the Webmaster.