unable to retrieve Node ID and Link ID using Epanet toolkit in c#

34 views
Skip to first unread message

Do Nhu Cuong

unread,
Dec 4, 2013, 6:10:12 AM12/4/13
to epa...@googlegroups.com
Hi there
I'm trying to write a program in c# using epanet toolkit (EpanetCsharpLibrary downloaded from http://www.water-simulation.com/wsp/2013/04/21/using-epanet-toolkit-in-csharp/ ).
The program works fine, only one thing unable to get from the toolkit is Node ID and Link ID (I have used functions ENgetnodeID and ENgetlinkID, no error found in the program). The function in EpanetCsharpLibrary seems to be not right.
Does anyone have the same problem and know how to fix it? Could you please help me asap?
Thank you very much

Part of the code to get nodeID here

EPANode[] nodeNumber = new EPANode[nodeCount + 1];                     
int getNodeType = 0;
string getnodeID="";
            for (int i = 1; i <= nodeCount; i++)
            {
               
                nodeNumber[i] = new EPANode();                               

                nodeNumber[i].Index = i;                                          
               
                Epanet.ENgetnodetype(i, ref getNodeType);                                         
               
               
                Epanet.ENgetnodeid(i, getnodeID);
                nodeNumber[i].ID = getnodeID;

                                          
                NodeTypeExplaination nodeTypeexplain = new NodeTypeExplaination();
                nodeNumber[i].Type = nodeTypeexplain.EPAgetNodeType(getNodeType);        

                dt.Rows.Add(nodeNumber[i].ID, nodeNumber[i].Type); // add to table
               
            }



Vyacheslav Shevelyov

unread,
Jan 15, 2015, 3:38:39 AM1/15/15
to epa...@googlegroups.com

Elad Salomons

unread,
Jan 15, 2015, 3:57:40 AM1/15/15
to epa...@googlegroups.com
Hi,

There is an updated C# library by Vyacheslav Shevelyov here:

Elad

Sent from my Acorn Atom

On Thu, Jan 15, 2015 at 10:38 AM, Vyacheslav Shevelyov <vyacheslav...@gmail.com> wrote:

--
--
Books on Epanet and development: http://www.arnalich.com/en/books.html
 
---
www.arnalich.com
 
To send a message to the group, email: epa...@googlegroups.com
 
To unsubscribe, send a message to: epanetD+u...@googlegroups.com

---
You received this message because you are subscribed to the Google Groups "Epanet and Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to epanetD+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages