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.
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 :
That means that you have to implement a node by node, edge by edge way to add nodes and edges to the graph
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.
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?
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.
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register
Start with some of our most frequented solutions to get help installing your software.