Palisade Knowledge Base

HomeTechniques and Tips@RISK Simulation: Graphical ResultsSetting DPI for Images Generated by @RISK

7.25. Setting DPI for Images Generated by @RISK

Applies to: @RISK 6.x/7.x

I need a particular DPI (dots per inch) setting for publication. When I click Chart in Excel, the DPI doesn't seem to be one of the options. How can I set it?

Really this question is not so much about customizing the DPI or PPI setting, as it is about specifying the size of the image in pixels. Once you generate an image that's big in terms of the pixel width and height (and still sharp), you can change the DPI with a tool like Photoshop or the free Irfanview. If you don't want to install software you can use a Web page like Change DPI of Image. The DPI setting will tell the printer or publisher how big the printed image will be. But of course most pieces of software have other ways of specifying the printed size, without changing DPI. So DPI may not be the primary concern here.

The @RISK GUI (Graphical User Interface) doesn't have an option for specifying the sizes of images in pixels. This shouldn't be a big problem when handling one graph or a handful of them, since you can resize a picture in Excel manually and get one with a bigger pixel size that is as sharp as the original. This is generally true when you insert a raster/bitmap image into Excel—you resize it and it stays sharp, as if it was a vector image.

Attached is a sample @RISK graph that we resized in Excel, by dragging the corner, to get an image with about 2800x1900 pixel size. We then changed the DPI from 96 to 300 using the Web page mentioned above. You can see that the image is quite sharp.

If I can't specify image size in @RISK, can I do it in VBA?

Yes, you can do it in VBA (Visual Basic for Applications), if you have @RISK Professional or Industrial. Click Help » Developer Kit (XDK) » XDK Reference, and search for the ImageToFile method. The optional third and fourth arguments specify the width and height in pixels, with 600 × 400 as default.

Last edited: 2017-02-22

Downloads

This page was: Helpful | Not Helpful