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 Directions Attribute Mapping

  • Summary
  • Properties
  • Code sample

Summary

The Network Directions Attribute Mapping object provides information about the descriptor attributes in your network dataset that are mapped to specific properties in the network dataset's directions configuration.

Properties

PropertyExplanationData Type
attribute
(Read Only)

The name of the network attribute mapped to the directions property described by the key property.

String
key
(Read Only)

The name of the network dataset directions property to which the network dataset's attribute is being mapped.

String

Code sample

Network Directions Attribute Mapping Properties example

Print the network dataset's directions attribute mapping properties.

# Name: NDSDirectionsAttributeMapping_ex01.py
# Description: Print information about the directions attribute mappings
#              for the network dataset.

import arcpy
import sys

network = r"C:/Data/NetworkDatasetWithDirections.gdb/Transportation/Streets_ND"

# Create Describe object for the network dataset
desc = arcpy.Describe(network)

# If the directions are not set for the network dataset, exit
if not desc.supportsDirections:
    print("No direction information")
    sys.exit()

# Get all the network's directions properties
directions = desc.directions

# Loop through the attribute mappings
if hasattr(directions, "attributeMappings"):
    attrMappings = directions.attributeMappings
    for mapping in attrMappings:
        print("\nKey:", mapping.key)
        print("Attribute:", mapping.attribute)
else:
    print("Network dataset does not contain directions attribute mappings.")

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