Save a NodeXL graph as an image

Jun 14, 2010 at 8:55 AM
Edited Jun 15, 2010 at 9:36 AM

I need to generate graph in different layouts.

I am using NodeXLControl class to draw the graph but I am unable to save it as an image on my filesystem.

Also I tried using NodeXLVisual class and still I am not succeeding.


Thanks in advance....


Jun 14, 2010 at 5:26 PM

Use the NodeXLControl.CopyGraphToBitmap() method to create a System.Drawing.Bitmap of your graph, then use Bitmap.Save() to save the Bitmap to a file.  If you want to see how the NodeXL Excel Template does this, the code (as of June 14, 2010) is in the SaveGraphImageFileDialog class:

-- Tony

Jun 15, 2010 at 1:07 PM

Thanx Tony for the help.

You doing a great job!!!