INetworkEvaluatorSetup Interface

Provides access to members that set up a network evaluator for use within a network dataset.

Members

Name Description
Read-only property CLSID Unique CLSID identifier for this network evaluator.
Read/write property Data The data used by this network evaluator for custom properties.
Read-only property DataHasEdits Indicates if the data for this evaluator has been edited.
Method Initialize Initializes the network evaluator in preparation to evaluate the attribute value of a network element.
Method QueryValue Evaluates the attribute value of a network element.
Method SupportsDefault Indicates if this network evaluator can be used as the default evaluator for the given network element type and network attribute.
Method SupportsSource Indicates if this network evaluator can be used as the evaluator for the given network source and network attribute.
Method ValidateDefault Indicates if the network evaluator is in a valid state for use as the default evaluator for the given element type and network attribute.
Method ValidateSource Indicates if the network evaluator is in a valid state for use as the evaluator for the given network source and network attribute.

INetworkEvaluatorSetup.CLSID Property

Unique CLSID identifier for this network evaluator.

Public ReadOnly Property CLSID As UID
public UID CLSID {get;}

INetworkEvaluatorSetup.Data Property

The data used by this network evaluator for custom properties.

Public Property Data As IPropertySet
public IPropertySet Data {get; set;}

Remarks

The Data property stores data that is needed by the evaluator. It is stored in a PropertySet object using key-value pairs.

INetworkEvaluatorSetup.DataHasEdits Property

Indicates if the data for this evaluator has been edited.

Public ReadOnly Property DataHasEdits As Boolean
public bool DataHasEdits {get;}

Remarks

The DataHasEdits property indicates whether changes have been made to the Data PropertySet that have not yet been handled by the evaluator's internal logic. This is useful in determining whether the evaluator needs to be re-Initialized before making additional calls to QueryValue.

This property is only used when modifying the network dataset's evaluators via objects like the EvaluatorEditor to signify the network dataset may need to be rebuilt/reinitialized. This property is not queried prior to network analysis to determine if the evaluator needs to be re-initialized. Thus, it is not a mechanism to trigger that the evaluators need to be re-initialized based on new data between solves.

INetworkEvaluatorSetup.Initialize Method

Initializes the network evaluator in preparation to evaluate the attribute value of a network element.

Public Sub Initialize ( _
    ByVal NetworkDataset As INetworkDataset, _
    ByVal DataElement As IDENetworkDataset, _
    ByVal Source As INetworkSource, _
    ByVal Attribute As IEvaluatedNetworkAttribute _
)
public void Initialize (
    INetworkDataset NetworkDataset,
    IDENetworkDataset DataElement,
    INetworkSource Source,
    IEvaluatedNetworkAttribute Attribute
);

Remarks

The Initialize method does all the "heavy lifting" needed to prepare the evaluator for a call to QueryValue, a lightweight method for querying the attribute value for a network element. Once the evaluator is initialized, the client can make multiple calls to this lightweight QueryValue for calculating the attribute values of multiple network elements.

When querying for attribute values in the network dataset ArcGIS calls the Initialize method immediately after it instantiates the evaluator. For evaluators with CacheAttribute = True, this occurs when building the network dataset. For evaluators with CacheAttribute = False, this occurs on the first call in the session to INetworkElement::AttributeValue or ::AttributeValueByName that requires this evaluator to determine the attribute value.

INetworkEvaluatorSetup.QueryValue Method

Evaluates the attribute value of a network element.

Public Function QueryValue ( _
    ByVal Element As INetworkElement, _
    ByVal Row As IRow _
) As Object
public object QueryValue (
    INetworkElement Element,
    IRow Row
);

Remarks

QueryValue uses this evaluator to compute the attribute value for the given network element.

The Element and Row parameters are provided in order to query any information from the network element or from the Row (such as field values) corresponding to the given network element when computing the attribute value.

When computing attribute values that will be cached within the network, QueryValue is automatically called by the system when building the network dataset, and the Row from the corresponding source feature will be passed into QueryValue in the Row parameter and null will be passed into the Element parameter. When querying non-cached attribute values via the INetworkElement interface, the system will pass in the network element into the Element parameter and null will be passed into the Row parameter.

Before calling QueryValue, the evaluator must first be initialized by calling the Initialize method. After calling Initialize, QueryValue can be called multiple times to calculate attribute values for multiple network elements.

INetworkEvaluatorSetup.SupportsDefault Method

Indicates if this network evaluator can be used as the default evaluator for the given network element type and network attribute.

Public Function SupportsDefault ( _
    ByVal ElementType As esriNetworkElementType, _
    ByVal Attribute As IEvaluatedNetworkAttribute _
) As Boolean
public bool SupportsDefault (
    esriNetworkElementType ElementType,
    IEvaluatedNetworkAttribute Attribute
);

Remarks

The SupportsDefault method is used to determine if the evaluator can be used to assign default attribute values for elements of the given type. If SupportsDefault is False, then the evaluator does not show up as a default evaluator choice for the user in the Evaluators dialog in ArcCatalog.

INetworkEvaluatorSetup.SupportsSource Method

Indicates if this network evaluator can be used as the evaluator for the given network source and network attribute.

Public Function SupportsSource ( _
    ByVal Source As INetworkSource, _
    ByVal Attribute As IEvaluatedNetworkAttribute _
) As Boolean
public bool SupportsSource (
    INetworkSource Source,
    IEvaluatedNetworkAttribute Attribute
);

Remarks

The SupportsSource method is used to determine if the evaluator can be used to assign attribute values for elements generated by the given source. If SupportsSource is False, then the evaluator does not show up as a choice for the user in the Evaluators dialog in ArcCatalog.

INetworkEvaluatorSetup.ValidateDefault Method

Indicates if the network evaluator is in a valid state for use as the default evaluator for the given element type and network attribute.

Public Function ValidateDefault ( _
    ByVal ElementType As esriNetworkElementType, _
    ByVal Attribute As IEvaluatedNetworkAttribute, _
    ByRef ErrorCode As Integer, _
    ByRef ErrorDescription As String, _
    ByRef errorAppendInfo As String _
) As Boolean
public bool ValidateDefault (
    esriNetworkElementType ElementType,
    IEvaluatedNetworkAttribute Attribute,
    ref int ErrorCode,
    ref string ErrorDescription,
    ref string errorAppendInfo
);

INetworkEvaluatorSetup.ValidateSource Method

Indicates if the network evaluator is in a valid state for use as the evaluator for the given network source and network attribute.

Public Function ValidateSource ( _
    ByVal datasetContainer As IDatasetContainer2, _
    ByVal NetworkSource As INetworkSource, _
    ByVal Attribute As IEvaluatedNetworkAttribute, _
    ByRef ErrorCode As Integer, _
    ByRef ErrorDescription As String, _
    ByRef errorAppendInfo As String _
) As Boolean
public bool ValidateSource (
    IDatasetContainer2 datasetContainer,
    INetworkSource NetworkSource,
    IEvaluatedNetworkAttribute Attribute,
    ref int ErrorCode,
    ref string ErrorDescription,
    ref string errorAppendInfo
);

Classes that implement INetworkEvaluatorSetup

Classes Description
NetworkConstantEvaluator A container for describing a network attribute evaluator whose values are derived from a constant value.
NetworkEdgeTrafficEvaluator A container for members in time dependent travel time evaluator.
NetworkFieldEvaluator A container for describing a network attribute evaluator whose values are derived from object field attributes.
NetworkFunctionEvaluator A container for describing a network evaluator function.
NetworkGlobalTurnDelayEvaluator A container for describing a network attribute evaluator for global turn delay whose values are specified by global turn delay settings.
NetworkScriptEvaluator A container for describing a network attribute evaluator whose values are derived from VBScript expressions.
NetworkTransitEvaluator A container for describing a network attribute evaluator for transit whose values are specified by transit tables.

Remarks

The INetworkEvaluatorSetup and INetworkEvaluator interfaces contain methods that one should implement when writing a custom evaluator.

The methods on INetworkEvaluatorSetup are called by the evaluator framework of the network dataset, and are not typically called by client ArcObjects code.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.