Script Detailed Description


DRAININPUT creates a virtual table to hold data on the drains of an ISBL system. Each column represents one of the items of information required for each drain. These items are:
naUTilus reads this data as a series of comma separated variables, one line of input per drain. Thus, representing each variable by a field enables easy generation of this portion of the input file.

The most difficult portion of creating this portion of the input is to correctly establish the connectivity of the drains to the branches or nodes. The script does this by using information in the attribute tables of both the branch and node theme. Three key fields in the node theme's attribute table were "Arc_", "Inode", and "Node". "Arc_" describes which branch flows out of each node. Inode is the ArcView unique identifier for each node.

"Node" was created when running the script SORTPOINT. The field holds a zero value if the node would not be numbered in the naUTilus numbering system and assigns a node number to the other nodes. These numbers become the numbers used for the naUTilus numbering system.

Those points which ArcView identifies as nodes, but naUTilus does not number are locations of elbow drains. The connectivity, then, is the branch into which each of these feeds. So when the node type, identified by SORTPOINT indicates an elbow drain, the connectivity field of the new table is filled with the value of the field "Arc_" in the node attribute table. The other nodes, representing on line drains, are filled with the value from the field "Node" of the node attribute table.

One exception occurs. The terminal node in ArcView is not defined in the same fashion as the terminal node in naUTilus The terminal ArcView node is identified in the script SORTPOINT. The terminal naUTilus node is identified in the DRAINIPUT script. This is done by finding the branch which feeds to the ArcView terminal node (from the "Arc_" field of that node), identifying the branch in the branch attribute table, and identifying which node is at the opposite end of the branch. In other words, what ArcView considers the system's terminal node is the "To node" of the last branch. naUTilus considers the "From node" of the last branch as the last node and does not number the ArcView terminal node.

Key Avenue commands used:
aVtab.MakeNew
Field.Make
aVtab.AddFields
aVtab.AddRecord
aFtab.ReturnValue
aVtab.ReturnValue
Loops: If/Then, If/Elseif/Then, For each record in aVtab
aVtab.SetValue

Return to Update document