.NET

Reply
Active Member
Selevkos
Posts: 9
Registered: ‎04-05-2013
Message 1 of 4 (234 Views)

Graph class in Autocad.NET

234 Views, 3 Replies
04-06-2013 02:57 AM

Hi all,

 

While trying to develop topological network structure within autocad, I realized that there is "Graph", "GraphNode", "Graphnode Collection" Classes within Autocad.net API.

 

I want to learn if these classes can be used to generate topological network. If so, please let me know how to do that.

 

Thanks ın advance.

Valued Mentor
gasty1001
Posts: 471
Registered: ‎04-11-2010
Message 2 of 4 (195 Views)

Re: Graph class in Autocad.NET

04-07-2013 10:41 AM in reply to: Selevkos

Hi,

 

It will depend on the class of network and the analisys you intend to do on the network, it seems that the Graph API its aimed to "rooted" graphs or trees, but also it doesn't have a lot of methods thet easier the life with graphs: I don't see :

 

  • AddNodeRange
  • AddEdgeRange

That means that you have to implement a node by node, edge by edge way to add nodes and edges to the graph

 

  • Node.Degree (the total number of edges connected to a node)
  • Node.OutDegree (the number of edges outbound of that node)
  • Node.InDegree (the number of node inbound of that node)
  • Node.InBoundEdges (edge collection of inbound edges)
  • Node.OutBoudEdges (edge collection of outbound edges)

You will ned that for node connectivity analisys 

 

The are lots of others thing one would expect to be included in a comprehensive Graph API, like node traversing algorithms implementation (A* search, Depth First search, Upstream search, etc). 

IMO this is a very limited API, but it can (and it must) be extended to suit a general purpose network topology graph API, so if you can't afford to implement the needed extensions, then would be a better idea to grab some other graph API, personally I use quickgraph, but it's a personal choise.

 

Regards,

 

Gaston Nunez

Active Member
Selevkos
Posts: 9
Registered: ‎04-05-2013
Message 3 of 4 (190 Views)

Re: Graph class in Autocad.NET

04-07-2013 11:35 AM in reply to: gasty1001

Thank you for the reply.

 

In fact, I also understood that it is not sufficient to create a solid network topolgy. To be honest, it seems to me this class is useless.

 

Anyway, I will have to use an external graph API. May be, quick graph will be a good choice as you mentioned. But I wonder if an external database should be used to store graph relation data such as edges and nodes. Or is there any way to store such graph data in the internal database of autocad. 

 

You say that you are using quick graph api. Did you use it in atuocad? If you used this api in autocad, can you please tell me what you used for storing the graph data?

 

 

 

 

 

 

 

 

Valued Mentor
gasty1001
Posts: 471
Registered: ‎04-11-2010
Message 4 of 4 (186 Views)

Re: Graph class in Autocad.NET

04-07-2013 12:12 PM in reply to: Selevkos

Hi,

 

As for storing graph, network topology, or plain topologys in a data base, you can take a look to Oracle Spatial, or MS SQL Server 2008, they  include a spatial extension that permit store topological structures in them, and better, direct topological querys over the spatial data.

 

I'm using quicgraph mainly to represente wall connectivity in a custom solution for concrete formwork and scaffolding, but I'm not using persistent storage of graphs, anyway quickgraph implements serialization to GML, and XML, so, It should be no difficult to store that info in a data base. You can check the quickgraph Docs

 

Also You can use AutoCAD Map 3D, it have a lot of tools for GIS analysis, including network topology analysis, and Oracle Spatial connectivity.

 

Gaston Nunez

 

 

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.