tpm_anadissolve

Land Desktop Development ARX CPP SDK

Up a level
tpm_anadissolve
 
 

Combines topology elements that have the same value in the specified field and stores the results in a new topology.

Use this function to create a topology that displays less specific geographic information than the original topology. For example, if a data table attached to a map of city blocks has a field that lists the blocks as commercial or residential, a dissolve can create a new topology in which city block boundaries have been removed.

int

tpm_anadissolve(

ade_id source_id,

char *field,

ade_id var_id,

char *result_name,

char *result_desc,

char *objTable,

char *objColumn);

Returns RTNORM or an error code.

source_id The topology ID of the topology you want to dissolve. You can dissolve polygon or network topologies only.
field The field used to dissolve the topology. The field is a standard data extension expression, for example, :Value@Tab1, .Layer. Topology elements that share the same data value in this field will be combined.
var_id The topology variables ID.
result_name The name of the resulting topology, which will be be loaded but not open. If argument is omitted or NULL, the dissolve results in a collection of AutoCAD objects.
result_desc The description of the resulting topology or NULL.
objTable The name of the object data table in the resulting topology that will store the shared dissolve field value or NULL.
objColumn The name of the field in the object data table that will store the shared dissolve field value or NULL.

The last four parameters are mutually dependent. If you want to omit these parameters, use NULL as a placeholder.

The topology variables ID references a set of topology variables.

The function works for polygon or network topologies. If it finds two or more attached objects that have the same value in the specified dissolve field, it dissolves them.

  • Dissolving polygons deletes their centroids and shared links and creates a new polygon with a new centroid.
  • Dissolving links deletes shared nodes. The links are merged into one polyline.

The function writes the shared dissolve field value to the object data table and field that you specify and attaches the table to the result object. If this table does not exist, the function creates it. If the table you specify is already attached to one of the source objects, a table with default values is attached to the result object.