com.esri.arcgis.geodatabase
Interface INetworkScriptEvaluator

All Superinterfaces:
Serializable
All Known Implementing Classes:
NetworkScriptEvaluator

public interface INetworkScriptEvaluator
extends Serializable

Provides access to members that specify the properties of a network attribute evaluator whose values are derived from VBScript expressions.

Remarks

The INetworkScriptEvaluator interface accesses the code used by a NetworkScriptEvaluator object for calculating the attribute value for a network element. Any setup computations needed prior to calculate the attribute value are specified in the preLogic parameter. The value of the attribute is computed from the expression.

The example below shows the preLogic and expression for penalizing all left turns 20 seconds:


  addedTime = 0

        a = Turn.Angle

        If a > 210 And a < 330 Then

          addedTime = 20

        End If








     addedTime

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.


Method Summary
 void getExpression(String[] expression, String[] preLogic)
          Gets the VBScript calculator expression and pre-logic used to derive the values for this network evaluator.
 void setExpression(String expression, String preLogic)
          Sets the VBScript calculator expression and pre-logic used to derive the values for this network evaluator.
 

Method Detail

setExpression

void setExpression(String expression,
                   String preLogic)
                   throws IOException,
                          AutomationException
Sets the VBScript calculator expression and pre-logic used to derive the values for this network evaluator.

Remarks

When specifying the preLogic parameter for code with multiple lines, use the CarriageReturn-LineFeed character at the line breaks.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
expression - The expression (in)
preLogic - The preLogic (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getExpression

void getExpression(String[] expression,
                   String[] preLogic)
                   throws IOException,
                          AutomationException
Gets the VBScript calculator expression and pre-logic used to derive the values for this network evaluator.

Remarks

When examining the preLogic parameter for code with multiple lines, the CarriageReturn-LineFeed character is at the line breaks.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
expression - The expression (in/out: use single element array)
preLogic - The preLogic (in/out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.