tpm_mntbuild

Land Desktop Development ARX CPP SDK

Up a level
tpm_mntbuild
 
 

Builds a topology.

int

tpm_mntbuild(

ade_id var_id,

char *name,

char *desc,

int type,

ads_name node_ss,

ads_name link_ss,

ads_name cntr_ss);

Returns RTNORM or an error code.

var_id Topology variables ID.
name Topology name.
desc Topology description.
type Topology type code. Values can be 1 (node), 2 (network), or 3 (polygon).
node_ss Entity selection set of nodes or NULL.
link_ss Entity selection set of links or NULL. Omit for node topology.
cntr_ss Entity selection set of centroids or NULL. Omit for node and network topology.

If you are building a node topology, the link_ss and cntr_ss arguments should be NULL. If you are building a network topology, the cntr_ss argument should be NULL.

The topology variables ID references a set of topology variables.

The new topology is loaded, but closed. You must open it with tpm_acopen.

The following AutoCAD object types are acceptable for topology elements:

  • For links: line, arc, circle, 2D and 3D polyline
  • For nodes and centroids: point, insert, and text

A node topology can contain only nodes. A network topology can contain nodes or links, but not centroids. A polygon topology can contain all three.

When the topology is built, all links are assigned a default direction of bidirectional (a value of 0). The forward and reverse resistance values are the length of the link. Nodes are assigned a resistance of 0.

When a topology is built, it is given a set of object data fields. These fields contain information about the elements of the topology.