ListDirectionsLanguages (arcpy.na)

サマリ

Returns a list of the languages in which you can generate directions for the routes you create during network analysis. The list of available languages depends on which directions language packs you have installed on your machine.

説明

The choice of available languages depends on the ArcGIS language packs you have installed. To support more languages in your directions, install more language packs.

This function can be used in custom script tool validation to populate a ValueList of available directions languages for the user to choose from, similar to the Directions Language parameter of the Find Closest Facilities tool.

構文

ListDirectionsLanguages (network_dataset_path)
パラメータ説明データ タイプ
network_dataset_path

A variable that references the catalog path of the network dataset. The catalog path of a network dataset can be obtained from the dataSource property of a network dataset layer or a network analysis layer object. It can also be obtained from the catalogPath property of a network dataset describe object.

String
戻り値
データ タイプ説明
String

The output list of available directions languages contains two- or five-character strings representing the languages installed on your machine. It will be a subset of the following languages:

  • arArabic
  • deGerman
  • enEnglish
  • esSpanish
  • frFrench
  • itItalian
  • jaJapanese
  • pt-BRBrazilian Portuguese
  • ruRussian
  • zh-CNSimplified Chinese

コードのサンプル

Reads the available languages from the network dataset and stores them in a variable.

# Path to an on-disk network dataset
nds = r'C:\arcgis\ArcTutor\Network Analyst\Tutorial\SanDiego.gdb\Transportation\Streets_ND'

# Create a list of directions languages available with your ArcGIS installation
languages = arcpy.na.ListDirectionsLanguages(nds)

関連トピック

4/26/2014