How to Build and Edit Network From a Text File in Cube?


Product(s):Cube
Version(s):6.1 to 6.5
Area:Network


Previously
 we learned how to build a CUBE network file (NET) from a shapefile. In this next example, we will demonstrate how to build and edit .NET file in Cube. For building and editing networks, we will use NETWORK program. Download the attached ZIP to begin.

Solution

First step, we would like to build network from text file. Link file is the following below. Where the field names are A, B, Distance, Speed, Capacity, and class. Class=1 arterial and Class=2 centroid connectors


Node file is the following below. The field names are N (node), X, Y (coordinates).




NOTE #1: N is a mandatory field for a NODEI file. Also if you want to view your network in Cube, then the X and Y coordinates must be provided as well.

After we build the network in Cube (as NETWORK 1 in the attached catalog), you can view the following network:


Now, we will show you how to obtain link and node information in Cube, see NETWORK 2 in the attached catalog.

If you want to obtain node X Y coordinates, you need to get them in the LINKMERGE phase, since those information is actually carried on the links (See NETWORK program #2). Deleting/adding links and nodes are demonstrated in NETWORK programs #3 and #4.


NOTE #2: for adding links and nodes, the LINKI and NODEI needs to be paired.

In our example,



The LINKI[2] is the file for new links. You need to specific NODEI[2] for the new nodes! The last step is to add new attributes to the links, see NETWORK program #5.


NOTE #3: for any variable name not starting with ‘’ , they will be added to your output network.
NOTE #4: For variable names start with '’, they are considered as temporal variables therefore, they won’t be in the output network.

communities.bentley.com/.../editNetwork.zip