ArcObjects Library Reference (NetworkAnalyst)  

INASolverSettings.AccumulateAttributeNames Property

The collection of network attribute names to be accumulated with the analysis.

[Visual Basic .NET]
Public Property AccumulateAttributeNames As IStringArray
[C#]
public IStringArray AccumulateAttributeNames {get; set;}
[C++]
HRESULT get_AccumulateAttributeNames(
  IStringArray** attributeNames
);
[C++]
HRESULT putref_AccumulateAttributeNames(
  IStringArray* attributeNames
);
[C++]

Parameters

attributeNames [out, retval]

  attributeNames is a parameter of type IStringArray

attributeNames [in]

  attributeNames is a parameter of type IStringArray

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires Network Analyst Extension.

Remarks

AccumulatedAttributeNames provides access to an IStringArray with the list of attribute names being accumulated by a network analyst solver. For example, the route solver could solve using a drivetime attribute and also accumulate the length of the shortest path in miles.

If the solver is not accumulating any attributes, this method will return a string array with 0 elements in it.

The get property returns a copy of the IStringArray.  You must explicitly set the property after modifying the contents of the IStringArray.

[C#]

This sample illustrates adding some additional attributes to accumulate:

   IStringArray accumulateAttributeNames = naSolverSettings.AccumulateAttributeNames;
   accumulateAttributeNames.Add("TravelTime");
   accumulateAttributeNames.Add("Distance");
   naSolverSettings.AccumulateAttributeNames = accumulateAttributeNames;

See Also

INASolverSettings Interface

.NET Samples

Closest facility application using the NAServer extension in ArcGIS Server via a GIS server (Code Files: ClosestFacility_GISServerAPIClass) | Network Analyst Engine application (Code Files: frmNALayerProperties) | Route application using the NAServer extension in ArcGIS Server via a GIS client (Code Files: Route_GISClientClass) | Route application using the NAServer extension in ArcGIS Server via a GIS server (Code Files: Route_GISServerAPIClass) | Service area application using the NAServer extension in ArcGIS Server via a GIS server (Code Files: ServiceArea_GISServerAPIClass) |