INetworkScriptEvaluator Interface
Provides access to members that specify the properties of a network attribute evaluator whose values are derived from VBScript expressions.
Members
Name | Description | |
---|---|---|
![]() |
GetExpression | Gets the VBScript calculator expression and pre-logic used to derive the values for this network evaluator. |
![]() |
GetLanguage | Gets the script language |
![]() |
SetExpression | Sets the VBScript calculator expression and pre-logic used to derive the values for this network evaluator. |
![]() |
SetLanguage | Sets the script language |
INetworkScriptEvaluator.GetExpression Method
Gets the VBScript calculator expression and pre-logic used to derive the values for this network evaluator.
Public Sub GetExpression ( _
ByRef Expression As String, _
ByRef preLogic As String _
)
public void GetExpression (
ref string Expression,
ref string preLogic
);
Remarks
When examining the preLogic parameter for code with multiple lines, the CarriageReturn-LineFeed character is at the line breaks.
INetworkScriptEvaluator.GetLanguage Method
Gets the script language
Public Sub GetLanguage ( _
ByRef Language As String _
)
public void GetLanguage (
ref string Language
);
INetworkScriptEvaluator.SetExpression Method
Sets the VBScript calculator expression and pre-logic used to derive the values for this network evaluator.
Public Sub SetExpression ( _
ByVal Expression As String, _
ByVal preLogic As String _
)
public void SetExpression (
string Expression,
string preLogic
);
Remarks
When specifying the preLogic parameter for code with multiple lines, use the CarriageReturn-LineFeed character at the line breaks.
INetworkScriptEvaluator.SetLanguage Method
Sets the script language
Public Sub SetLanguage ( _
ByVal Language As String _
)
public void SetLanguage (
string Language
);
Classes that implement INetworkScriptEvaluator
Classes | Description |
---|---|
NetworkScriptEvaluator | A container for describing 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:
- PreLogic:
addedTime = 0
a = Turn.Angle
If a > 210 And a < 330 Then
addedTime = 20
End If
- Expression:
addedTime