Nodexl call from c#

Oct 24, 2011 at 2:28 PM

Hi Tony,

               can you tell where i can get example program for c# program incorporates a nodexl class library(NodeXL graph). pleas help me to learn NodeXl class library. vertex events & publis events (like mouse mode etc...). i have not get any material regarding this from internet. the NodeXLApi help also not gives enough idea. if you can just send me some materials & example.  my email id: mssarun5@gmail.com ....

 

Thanks & Regards,

Arun. 

Oct 24, 2011 at 5:50 PM

Arun:

I don't have any material that is appropriate for teaching Visual Basic .NET or C#.  (You mentioned in a previous post that you are new to both.)  I suggest starting with a good Visual Basic .NET book (I see that http://www.amazon.com/Murachs-Visual-Basic-2010-Boehm/dp/1890774588/ref=sr_1_1?ie=UTF8&qid=1319473870&sr=8-1 has gotten good reviews), or one of the many resources on the Internet geared towards getting programmers started with the language.  Then, when you are comfortable creating some applications that use the standard Windows Forms or WPF controls, you can drop the NodeXLControl into a form and start using its properties and events.

You mentioned that your program will need to take some action when a vertex is clicked.  In my next post, I'll include a slightly modified version of the sample NodeXLControl code from the help file.  It displays a vertex's name when the vertex is clicked.

If there are specific questions about the control that I can answer, let me know.

-- Tony

Oct 24, 2011 at 5:50 PM

using System;
using System.Drawing;
using System.Windows.Forms;
using Microsoft.NodeXL.Core;
using Microsoft.NodeXL.Visualization.Wpf;

namespace WindowsFormsApplication2
{
public partial class Form1 : Form
{
    private NodeXLControl nodeXLControl1;

    public Form1()
    {
        InitializeComponent();
        nodeXLControl1 = new NodeXLControl();
        elementHost1.Child = nodeXLControl1;

        // We're going to handle vertex clicks ourselves, so tell the control
        // to not do anything with them.  (By default, a vertex click will
        // select a vertex and allow it to be moved.)

        nodeXLControl1.MouseMode = MouseMode.DoNothing;

        nodeXLControl1.VertexClick += new VertexEventHandler(
            nodeXLControl1_VertexClick);
    }

    private void Form1_Load(object sender, EventArgs e)
    {
        PopulateAndDrawGraph();
    }

    protected void PopulateAndDrawGraph()
    {
        // Get the graph's vertex collection.

        IVertexCollection oVertices = nodeXLControl1.Graph.Vertices;

        // Add three vertices.

        IVertex oVertexA = oVertices.Add();
        IVertex oVertexB = oVertices.Add();
        IVertex oVertexC = oVertices.Add();

        // Set their Tags to some text that will be displayed when the user
        // clicks a vertex.  The Tag is of type Object and can be set to
        // whatever is appropriate for a particular application.

        oVertexA.Tag = "This is Vertex A.";
        oVertexB.Tag = "This is Vertex B.";
        oVertexC.Tag = "This is Vertex C.";

        // Change the color, radius, and shape of vertex A.

        oVertexA.SetValue(ReservedMetadataKeys.PerColor,
            Color.FromArgb(255, 255, 0, 255));

        oVertexA.SetValue(ReservedMetadataKeys.PerVertexRadius, 20F);

        oVertexA.SetValue(ReservedMetadataKeys.PerVertexShape,
            VertexShape.Sphere);

        // Draw vertex B as a Label, which is a rectangle containing text.

        oVertexB.SetValue(ReservedMetadataKeys.PerVertexShape,
            VertexShape.Label);

        oVertexB.SetValue(ReservedMetadataKeys.PerVertexLabel, "Label");

        // Set the label's text and fill colors.

        oVertexB.SetValue(ReservedMetadataKeys.PerColor,
            Color.FromArgb(255, 220, 220, 220));

        oVertexB.SetValue(ReservedMetadataKeys.PerVertexLabelFillColor,
            Color.FromArgb(255, 0, 0, 0));

        // Annotate vertex C with text that is drawn outside the vertex.  All
        // shapes except Label can be annotated.

        oVertexC.SetValue(ReservedMetadataKeys.PerVertexLabel, "Annotation");

        // Get the graph's edge collection.

        IEdgeCollection oEdges = nodeXLControl1.Graph.Edges;

        // Connect the vertices with directed edges.

        IEdge oEdge1 = oEdges.Add(oVertexA, oVertexB, true);
        IEdge oEdge2 = oEdges.Add(oVertexB, oVertexC, true);
        IEdge oEdge3 = oEdges.Add(oVertexC, oVertexA, true);

        // Customize their appearance.

        oEdge1.SetValue(ReservedMetadataKeys.PerColor,
            Color.FromArgb(255, 55, 125, 98));

        oEdge1.SetValue(ReservedMetadataKeys.PerEdgeWidth, 3F);
        oEdge1.SetValue(ReservedMetadataKeys.PerEdgeLabel, "This is edge 1");

        oEdge2.SetValue(ReservedMetadataKeys.PerEdgeWidth, 5F);
        oEdge2.SetValue(ReservedMetadataKeys.PerEdgeLabel, "This is edge 2");

        oEdge3.SetValue(ReservedMetadataKeys.PerColor,
            Color.FromArgb(255, 0, 255, 0));

        nodeXLControl1.DrawGraph(true);
    }

    private void nodeXLControl1_VertexClick(object sender,
        VertexEventArgs vertexEventArgs)
    {
        // PopulateAndDrawGraph() stored some text in each vertex's Tag.  Show
        // the text.

        MessageBox.Show( (String)vertexEventArgs.Vertex.Tag );
    }
}
}

Oct 25, 2011 at 6:53 AM

Hi Tony,

             Thanks a lot Tony. you are really great. NodeXL is a very good tool. I am waiting for your next post. Take care.

Arun.

Oct 25, 2011 at 6:57 AM

Arun:

My next post has already been posted.  Please see the complete discussion at http://nodexl.codeplex.com/discussions/276991.

-- Tony

Oct 25, 2011 at 10:06 AM

Hi Tony,

             Yes, sorry tony. thanks again.

Arun

Oct 25, 2011 at 10:56 AM

Hi Tony,

             I have a doubt. is it possible, if we click on one vertex it wil gives some more vertex & edges. that is three vertex A,B,C are there, whenever i click 'A' vertex it wil show some more vertex connected with 'A'. that is like D and E.

I am asking like tree structure. first time we generate a parent vertex. while clicking the parent vertex through mouse cursor it should show the child of that parent.

is it possible. give me an idea, how to implement this one.

Thanks & regards,

Arun

Oct 25, 2011 at 2:39 PM

Hi Tony,

           I have mentioned in the above post. I thing that is comes under Collapse group vertexs and Expand group vertexs. can you tell how i can implement that one. thanks.

Arun.

Oct 26, 2011 at 5:30 AM
Edited Oct 26, 2011 at 5:32 AM

The next post is a sample program that creates two vertex groups.  The form has two buttons, one to collapse one of the groups and another to expand the group.  It's assumed that the form also has an ElementHost control, into which the program inserts a NodeXLControl.

-- Tony

Oct 26, 2011 at 5:31 AM

using System;
using System.Drawing;
using System.Windows.Forms;
using Microsoft.NodeXL.Core;
using Microsoft.NodeXL.Visualization.Wpf;


namespace WindowsFormsApplication2
{
public partial class Form1 : Form
{
    private NodeXLControl nodeXLControl1;

    public Form1()
    {
        InitializeComponent();
        nodeXLControl1 = new NodeXLControl();
        elementHost1.Child = nodeXLControl1;
    }

    private void Form1_Load(object sender, EventArgs e)
    {
        PopulateAndDrawGraph();
    }

    protected void PopulateAndDrawGraph()
    {
        // Add vertices to the graph.

        IVertexCollection oVertices = nodeXLControl1.Graph.Vertices;

        IVertex oVertexA = oVertices.Add();
        IVertex oVertexB = oVertices.Add();
        IVertex oVertexC = oVertices.Add();

        IVertex oVertexD = oVertices.Add();
        IVertex oVertexE = oVertices.Add();

        // Connect the vertices with directed edges.

        IEdgeCollection oEdges = nodeXLControl1.Graph.Edges;

        IEdge oEdge1 = oEdges.Add(oVertexA, oVertexB, true);
        IEdge oEdge2 = oEdges.Add(oVertexB, oVertexC, true);
        IEdge oEdge3 = oEdges.Add(oVertexC, oVertexA, true);
        IEdge oEdge4 = oEdges.Add(oVertexD, oVertexE, true);

        // Create vertex groups.

        GroupInfo oGroup1 = new GroupInfo("Group1", false);
        oGroup1.Vertices.Add(oVertexA);
        oGroup1.Vertices.Add(oVertexB);
        oGroup1.Vertices.Add(oVertexC);

        GroupInfo oGroup2 = new GroupInfo("Group2", false);
        oGroup2.Vertices.Add(oVertexD);
        oGroup2.Vertices.Add(oVertexE);

        // Add the groups to the graph.

        nodeXLControl1.Graph.SetValue(ReservedMetadataKeys.GroupInfo,
            new GroupInfo[] { oGroup1, oGroup2});

        nodeXLControl1.DrawGraph(true);
    }

    private void btnCollapse_Click(object sender, EventArgs e)
    {
        // Collapse one of the vertex groups.

        nodeXLControl1.CollapseGroup("Group1", true);
    }

    private void btnExpand_Click(object sender, EventArgs e)
    {
        // Expand one of the vertex groups.

        nodeXLControl1.ExpandGroup("Group1", true);
    }
}
}

Oct 26, 2011 at 2:16 PM

Hi Tony,

               Thank you very much for your continues support regarding NodeXL call from C#. If i have any doubt i will ask you later.  Take care.

Arun.

Oct 29, 2011 at 3:31 AM

Hi Tony,

          can you tell how we can draw a vertex and edges in a particular position in particular style ( like tree etc...).  the above code take care those things itself. but while increasing vertex and Edges, sometimes some edges drawn on the particular edges and also the graph looks complex for understand. can you tell how we can draw our own ( like whatever place and style) graph.

Thanks & Regards,

Arun

Oct 29, 2011 at 8:33 PM

Arun:

First you will have to tell the NodeXLControl to not lay out the vertices itself:

using Microsoft.NodeXL.Layouts;
...
nodeXLControl1.Layout = new NullLayout();

Then you will have to set the Location of each of your vertices before you call the NodeXLControl.DrawGraph() method:

oVertexA.Location = new PointF(50, 60);
oVertexB.Location = new PointF(150, 90);

The Location units are pixels.  If you are using an ElementHost to host your NodeXLControl, you can get the graph bounds using ElementHost.ClientRectangle.

I do not know what you mean by "particular style."

-- Tony

Oct 30, 2011 at 3:25 AM

Hi Tony,

           Thank you tony. what i have mentioned like particular style means, NodeXL template "select the algorithm used to lay out the graph" option, we can layout the graph Harel-Koren Fast Multiscale, circle, spiral, Fruchterman-Reingold etc... how i can use these algorithms in NodeXL class library, that means in the above program.

Arun.

Oct 30, 2011 at 7:48 PM

Like this:

using Microsoft.NodeXL.Layouts;
...
nodeXLControl1.Layout = new HarelKorenFastMultiscaleLayout();

...or

nodeXLControl1.Layout = new CircleLayout();

...and so on.

See the NodeXLControl.Layout property in the NodeXLApi.chm help file for details.

-- Tony

 

Oct 31, 2011 at 5:49 AM

Hi Tony,

   Thanks, is there any possiblities like, first i have only one vertex, while click that vertex i can get four vertex which is related(jointed through edges) with first(clicked) vertex. in that four vertex, if i click any one it wil give someother vertex which is related to this vertex(whatever i clicked this time).

In collapseGroup and ExpandGroup that plus symbol has come. how to avoid that plus with circle.

my application is like one parent node is there, while clicking that parent node it should show the child of that node after i clicking that child node it wil show the child of that very lost clicked node.

but collapseGroup and ExpandGroup, we already drawn a graph just collapsed or Expand  the group whenever we need . What i am asking you is, can we draw the some vertex while clicking the one vertex by mouse.

 

Thanks & Regards,

Arun.

 

 

 

Oct 31, 2011 at 6:39 AM

Arun:

NodeXL does not support nested groups, which is where a collapsed group can contain other collapsed groups.  It also doesn't let you change the plus symbol that is used to denote a collapsed group.

From what you've told me, I think you are using the wrong control.  If you are attempting to display a tree data structure, you should be using a control that displays a tree, not one that displays a network.  In Windows Forms there is a control called TreeView that does just that.  It displays tree nodes as text or images by default, but it has a feature called "owner draw" that lets you customize the appearance of individual items in the tree.  In Windows Presentation Foundation (WPF) there is also a TreeView control, and like most WPF controls, its appearance can be customized to your heart's content.

-- Tony

Oct 31, 2011 at 1:41 PM

Hi Tony,

            Thank you Tony, my doubt is, we have drawn one graph like, it has three vertex A,B,C, while clicking the vertex A, can we get some more vertex like D, E  etc...

That means after clicking the vertex A only vertex D,E should drawn. my expectation is not like collapse and expand the group.

concept is like:

if(vertex A is clicked)

{

Ivertex oVertexD = oVertices.Add();

Ivertex oVertexE = oVertices.Add();

IEdge oEdge3 = oEdges.Add(oVertexA, oVertexD, true);

 

IEdge oEdge4 = oEdges.Add(oVertexA, oVertexE, true);

again-->

nodeXLControl1.DrawGraph(true

);

can we draw a graph with above concept? if you can give one example.

Thanks & Regards,

Arun

 

Oct 31, 2011 at 5:02 PM
Edited Oct 31, 2011 at 5:06 PM

Arun:

Yes, you can add vertices to the graph and redraw it, just as you've done in the code you just posted.  The only thing you're missing is the code to remove the clicked vertex, which would look something like this:

nodeXLControl1.Graph.Vertices.Remove(e.Vertex);

...where "e" is the event argument passed to the VertexClick event handler.

However, I don't know what behavior you --or more importantly, your users-- would expect with regard to the layout of the new and existing vertices.  Should the existing vertices stay in place?   If not, the change in layout is jarring and will likely confuse your users.  But if so, where should the new vertices go? Furthermore, what should happen to any edges that were connected to the vertex that was just removed?

The more you describe your application, the more I think that you need to either carefully reevaluate your model for user interaction, or use a different control, perhaps a custom control that does exactly what you need it to do.

-- Tony

Nov 16, 2011 at 11:59 AM

Hi Tony,

            How are you? can you tell me, how to define a edges in particular location. that is three vertex is there already like A,B and C. while i clicking A or any other vertex i have to so the relation of vertex through edges.

That means vertex A, B and C in one function. when i am clicking vertex A, it can call second function and draw two more vertex D and E. now i have to so the relationship between A and D,E through edges. but A is in Fn1 and D and E in Fn2.

how i can draw a edges between A and D,E in Fn2.

for vertex we can define the locations like

oVertexA.Location = new PointF(50, 60);
oVertexB.Location = new PointF(150, 90);

is there anything for edges like above.

Nov 16, 2011 at 7:36 PM

Hello, Arun:

I'm not sure I understand what you mean by "location."  Are you talking about "location within my functions," or "location in the graph pane"?

If it's the former, and you are wondering how to add an edge within Fn2, like this:

void Fn2()
{
    IVertex oVertexD = nodeXLControl.Graph.Vertices.Add()
    nodeXLControl.Graph.Edges.Add(oVertexA, oVertexD);
}

...when you don't have a reference to oVertexA within Fn2.  The answer is that in C#, you can define private data fields within your class that are available to all methods in the class.  So, for example, you can do this:

public class MyClass
{
private IVertex oVertexA;
private IVertex oVertexD;

void Fn1()
{
    oVertexA = nodeXLControl.Graph.Vertices.Add()
}

void Fn2()
{
    oVertexD = nodeXLControl.Graph.Vertices.Add()
    nodeXLControl.Graph.Edges.Add(oVertexA, oVertexD);
}
}

Fn2() has access to oVertexA, which was created in Fn1(), because oVertexA is a shared data field within the class.

You wouldn't do this in the general case, because you don't want to have to declare a data field for every vertex.  Instead, you would declare some sort of vertex collection as a data field, and store your vertices in the collection as you add them to the graph.  For example, you might use a Dictionary<String, IVertex> that maps a vertex name to a vertex, and look up the vertex by name when you need to connect a new edge to it.  The exact nature of the collection you use depends on your application.

-- Tony

Nov 17, 2011 at 5:00 AM

Hi Tony,

            What you understood is correct. Thank you very much tony.

 

-- Arun.

Nov 18, 2011 at 9:12 AM
Edited Nov 18, 2011 at 12:08 PM

Hi Tony,

    1.      can you tell me, How we can call Windows Forms Applications from someother C# console application or C# dll. both are like different project.

I have to call windows Forms Application(WFA) which is one project from another project which is C# dll or C# console application.That windows forms application has NodeXL code for some application.

2. second doubt is,  can we draw a graph dynamically?  that means, i can come to know the number of vertex and its relations(edges) in run time only. but i have to draw the graph with vertex click properties in run time. the code should be unique. it should run for any no of vertexes with any relationship. vertexs name and lables also will very every time.

 

here is one example code for understanding.

 

using System;
using System.Drawing;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using Microsoft.NodeXL.Core;
using Microsoft.NodeXL.Layouts;
using Microsoft.NodeXL.Visualization.Wpf;


namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        private NodeXLControl nodeXLControl1;       
        string V_Tag = null;     

        static int no_vertex = 41;
        float x = 20, y = 20;

        int flag1 = 0, flag_B = 0, flag_C = 0, flag_D = 0, flag_E = 0, flag_F = 0;

        int group_1 = 5, group_2 = 3, group_3 = 2;// dynamic
       

        public Form1()
        {
            InitializeComponent();
            nodeXLControl1 = new NodeXLControl();
           
            elementHost1.Child = nodeXLControl1;
            nodeXLControl1.Layout = new NullLayout();
            //nodeXLControl1.Layout = new HarelKorenFastMultiscaleLayout();
            //nodeXLControl1.Layout = new SugiyamaLayout();
            nodeXLControl1.MouseMode = MouseMode.DoNothing;
            nodeXLControl1.VertexClick +=
                new VertexEventHandler(nodeXLControl1_VertexClick);           

        }

       private IVertex[] oVertex = new IVertex[no_vertex];


      

        public void Form1_Load(object sender, EventArgs e)
        {
            PopulateAndDrawGraph();
        }

        public void PopulateAndDrawGraph()
        {
          
            IVertexCollection oVertices = nodeXLControl1.Graph.Vertices;

            oVertex[0] = oVertices.Add();

            oVertex[0].Location = new PointF(x+300, y);

            oVertex[0].SetValue(ReservedMetadataKeys.PerVertexShape,
               VertexShape.Label);

            oVertex[0].SetValue(ReservedMetadataKeys.PerVertexLabel, "A-Lable");

            oVertex[0].Name = "A-Lable";         

            nodeXLControl1.DrawGraph(true);

        }


        private void nodeXLControl1_VertexClick(object sender,
           VertexEventArgs vertexEventArgs)
        {


            IVertexCollection oVertices = nodeXLControl1.Graph.Vertices;

            V_Tag = vertexEventArgs.Vertex.Name.ToString();

            if ((V_Tag == "A-Lable") && (flag1 == 0))
            {
                group1(group_1, 1, 150, 1, 5, 0, 1);  //dynamic             
            }        

            else if ((V_Tag == "1") && (flag1 == 1) && (flag_B == 0))
            {
                group1(group_2, 6, 50, 1, 3, 1, 2); //dynamic 
                flag_B = 1;

            }

            else if ((V_Tag == "2") && (flag1 == 1) && (flag_C == 0))
            {
                group1(group_2, 9, 50, 1, 3, 2, 2);//dynamic                

                flag_C = 1;

            }

            else if ((V_Tag == "3") && (flag1 == 1) && (flag_D == 0))
            {
                group1(group_2, 12, 50, 1, 3, 3, 2); //dynamic 
                flag_D = 1;

            }

            else if ((V_Tag == "4") && (flag1 == 1) && (flag_E == 0))
            {
                group1(group_2, 15, 50, 1, 3, 4, 2);//dynamic 
                flag_E = 1;

            }

            else if ((V_Tag == "5") && (flag1 == 1) && (flag_F == 0))
            {
                group1(group_2, 18, 50, 1, 3, 5, 2);//dynamic 
                flag_F = 1;

            }        


            nodeXLControl1.DrawGraph(true);
        }

        public void group1(int val, int strt, int distnce, int p_node, int c_node,
                                                       int p_node_strt, int level)
        {

           
            flag1 = 1;
            IVertexCollection oVertices = nodeXLControl1.Graph.Vertices;         

          

            for (int i = 0; i <  val; i++)
            {
                string E_name = (strt + i).ToString();
                oVertex[strt + i] = oVertices.Add();
                oVertex[strt + i].SetValue(ReservedMetadataKeys.PerVertexShape,
                                                               VertexShape.Label);

                oVertex[strt + i].SetValue(ReservedMetadataKeys.PerVertexLabel, E_name);

                oVertex[strt + i].Name = E_name;
            }

 

            for (int i = 0; i < val; i++)
            {
                if(level==1)
                oVertex[strt + i].Location = new PointF((distnce) + (distnce * i), y + (100 * (level)));

                else if(level==2)
                oVertex[strt + i].Location = new PointF(((p_node_strt - 1) * 150) + (distnce * i) + x,
                                                                                   y + (100 * (level)));
               
            }

       

            IEdgeCollection oEdges = nodeXLControl1.Graph.Edges;

            for (int i = 0; i < p_node; i++)
            {
                for (int j = 0; j < c_node; j++)
                {
                    IEdge oEdge1 = oEdges.Add(oVertex[p_node_strt + i], oVertex[strt + j + (i * c_node)], true);

                }
            }
         
        }
      

    }
}

 

my coding skill is not good, now i am start to learing c#. just excuse me for my mistakes.

Thanks & Regards,

Arun.

Nov 18, 2011 at 6:23 PM
Edited Nov 18, 2011 at 6:24 PM

Arun:

In question 1, by "call Windows Forms application," do you mean that you want to start up your Windows Forms application from another application?  Yes, you can do that, although the technique depends on the nature of the other application.  If it's a .NET console application, you would do it like this:

System.Diagnostics.ProcessStart(@"C:\SomePath\WindowsFormsApplication.exe")

In question 2, yes, you can dynamically add vertices and edges to the graph at runtime, and then use NodeXLControl.DrawGraph(true) to draw the updated graph.  What specifically do you need to know?

-- Tony

Nov 21, 2011 at 7:36 AM

Hi Tony,

I have to pass no.of vertex and its name from c# dll to windows forms application which has nodexl code for drawing the graph.

both c# dll and my nodexl(WFA) are different project. but nodeXl get the datas(no.of vertex,vertex name and its relations(edges)) from dll.

now how i can pass the value from c# dll and how, where i can get that values in WFA.

if you can just give me some example.

Thanks & Regards,

Arun.

Nov 21, 2011 at 5:28 PM

Your C# DLL can't be used on its own, because Windows doesn't "run" DLLs.  It has to be linked into an application of some sort to make it usable.  Why not just link it into your Windows Forms application?  Then the code in your Windows Forms application can call the code in your DLL to get your vertex information and pass it to the NodeXLControl to draw it.

To link your DLL project into your Windows Forms project:

1. In Solution Explorer, right-click your Windows Forms project and select Add Reference from the right-click menu.

2. In the Add Reference dialog box, click the Projects tab.

3. Select your DLL project and click OK.

I've assumed here that both of your projects are in the same solution.  If your DLL project is in a different solution, you can use the Browse tab in the Add Reference dialog box instead of the Projects tab.

-- Tony

Nov 28, 2011 at 8:05 AM

Hi Tony,

I have used window forms application (NodeXL code) as a dll. but while calling nodeXL i have to close the previous windows forms application opened by that dll.

but i do not know, how to close. it i used "this.close" it gives "COM Surrogate has encountered a problem and needs to close.  We are sorry for the inconvenience" error. bcz that dll calling by "COM+ Applications"

 FormCollection fc = Application.OpenForms;
            if (fc.Count > 0)
            {            
              

               this.Close();

        Form1.ActiveForm.Close(); 
       

            }

 Above both condition gives same error.

nodeXLControl1.ClearGraph();---> this is also ineffective but doesnt gives any error......

Just give me an idea, how i can fix this problem.

Thanks & Regards,

 Arun

Nov 29, 2011 at 5:04 AM

Arun:

To close a Windows Forms application, call Application.Exit().  You can read about it at http://msdn.microsoft.com/en-us/library/ms157894(v=VS.90).aspx.

-- Tony

Nov 29, 2011 at 6:23 AM

Hi Tony, thank you very much.

 

Dec 7, 2011 at 10:59 AM

Hi Tony,

               Can we use CUDA(GPU) for nodexl application, if yes means just tell me, how we can integrate CUDA(GPU) with nodexl

Thanks & Regards,

Arun

Dec 7, 2011 at 10:33 PM

Arun:

You would need to be more specific about what you want CUDA to do for you.  I can tell you, though, that NodeXL doesn't use CUDA itself, and you can't tell NodeXL to use it without rewriting parts of NodeXL.

You could use CUDA in your own application if you have computation-intensive tasks that can be partitioned into parallel threads.  It's not for the faint of heart, though; concurrent programming is tricky business, and I think the CUDA APIs are for C and C++, not C#.

-- Tony

 

Dec 8, 2011 at 12:40 PM

Hi Tony,

                can you please tell me, how to draw nodexl graph in html or java script(Ext js). that means while calling nodexl, i have to show the graph in IE(Internet explorer).

My one solution is running in java script(Ext js) while calling nodexl it will show the graph in that java script itself.

now the nodexl graph shown as a exe file but i want to show that one as a html or java script.

Thanks & Regards,

Arun.

 

 

Dec 8, 2011 at 8:14 PM

Arun:

You can use NodeXLControl.CopyGraphToBitmap() to get a System.Drawing.Bitmap of the graph, then save the Bitmap to a file, then reference the file in an <img> tag from within your HTML page.

-- Tony

Feb 5, 2014 at 4:18 PM
Hi Tony,

Hoping this thread is still active.
I am trying to implement dynamic filters from Excel in C#, where I used NodeXL to produce the graph. I have the graphical output and want to implement dynamic
filters on this graph.

Is there a way to implement dynamic filters in C#? If so please advice me.


Thanks,
Sravanthi.
Feb 5, 2014 at 5:10 PM
Sravanthi:

I moved your question to http://nodexl.codeplex.com/discussions/529031 , because this particular discussion was starting to cover too many topics.

-- Tony