Save a NodeXL graph as an image

Jun 14, 2010 at 7:55 AM
Edited Jun 15, 2010 at 8: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 4: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 12:07 PM

Thanx Tony for the help.

You doing a great job!!!