ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

Network Attribute Parameter

  • Summary
  • Discussion
  • Properties
  • Code sample

Summary

Provides information about attribute parameters associated with the network analysis layer.

Discussion

The attributeName, parameterName, and parameterValue properties for the attribute parameter object are dynamic. This means that the total number of properties supported by a given attribute parameter object depends on the parameterCount property. For example, if the value of the parameterCount property is 2, then the attribute parameter object will support attributeName0, attributeName1, parameterName0, parameterName1, parameterValue0, and parameterValue1 properties.

Properties

PropertyExplanationData Type
attributeNameX
(Read Only)

The name of a network attribute for which the parameter is defined.

String
parameterNameX
(Read Only)

The name of the parameter.

String
parameterValueX
(Read Only)

The value for the parameter as specified in the network analysis layer. This parameter value is used during the solve operation.

Integer

Code sample

Network Analyst Layer Attribute Parameter example

Display the attribute parameter information for a network analysis layer.

# Name: NALayerAttributeParameterProperties_ex01.py
# Description: Prints the attribute parameter information for a given network 
#              analysis layernetwork analysis layer.

import arcpy 

in_layer = "C:/Data/Route.lyr" 

# Create Describe object from layer file.
desc = arcpy.Describe(in_layer) 

count = desc.parameterCount 
parameters = desc.parameters 

# Print attribute parameter values
print "Total Attribute Parameters: ", count 
for i in range(0, count): 
    attrName = getattr(parameters,"attributeName" + str(i))
    paramName = getattr(parameters,"parameterName" + str(i))
    paramValue = getattr(parameters,"parameterValue" + str(i))
    print "%s : %s : %s" % (attrName,paramName,paramValue)

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2021 Esri. | Privacy | Legal