All Cadcorp SIS API Methods

MultiRoute Method

Description

Measures routes between Items in a Named List.

Syntax

Visual Basic
Public Function MultiRoute( _
   ByVal list As String, _
   ByVal nStart As Long, _
   ByVal maxNum As Long, _
   ByVal maxVal As Double, _
   ByVal rSnap As Double, _
   ByVal formula As String, _
   ByVal filter As String, _
   ByVal locusNoGo As String _
) As String

Parameters

list

The items to find routes between. The origin of each Item in the Named List is used as a potential target location.

 
nStart
The index within list of the place to start from. The route finder will find lots of routes which all start from the nStart item.
 
maxNum

The maximum number of targets to find.

 
maxVal

The maximum route value to search within.

 
rSnap

The maximum distance from the start point to a Link item. The topological algorithm will spread out from the closest Link found. The distance from the point to the closest Link is not included in the cost calculation. Ideally, the start point should be on a Link item.

 
formula

The expression, or simple property, to use in the route finding calculation as the "cost" of a Link item. For example, using the simple property Length will find the shortest route, and using the expression "_length#/Speed#", provided each Link has a user-defined Speed# property, will find the quickest route. Any expression may be used, although if a string expression is used it must be a string representation of a numeric value. See Property Expression Syntax for details.

 
filter

Optionally specifies a named Filter which all Link Items must pass to be considered as part of the route.

 
locusNoGo

Optionally specifies a named Spatial Filter through which the route cannot pass.

Return Type

The return value is a string listing the distance from the starting Item to other Items in the Named List. Each list element has the following format "(index,val)", which describes the index of a target Item within list, and the route value from nStart to that item.

Remarks

Available: GEO OD SISpy

Group:

Example

sis.MultiRoute("spider", 0, 5, 1000, 100, "_length#", "", "")