tpm_traceshort

Land Desktop Development ARX CPP SDK

Up a level
tpm_traceshort
 
 

Calculates the shortest path between two nodes.

int

tpm_traceshort(

ade_id trace_id,

ade_id start,

ade_id end);

Returns RTNORM or an error code.

trace_id The tracing model ID, returned by tpm_tracealloc.
start The element ID of the start node.
end The element ID of end node.

For the shortest path trace to succeed, the total calculated resistance cannot be greater than the value set for the maximum resistance or less than the value set for the minimum resistance. See tpm_tracesetminres and tpm_tracesetmaxres. The accumulated resistance value is the total resistance of the nodes and links that make up the shortest path.