ListDirectionsStyleNames (arcpy.na)

摘要

返回一个可用方向样式列表,通过这些样式能够根据网络分析过程中创建的路径生成方向。每个方向样式适用于一种不同的应用。

讨论

在自定义脚本工具验证中可使用该功能来填充可用方向样式的 ValueList 以供用户从中进行选择,这与查找最近设施点工具的“方向样式名称”参数相类似。

语法

ListDirectionsStyleNames (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

包含代表您机器中已装样式的字符串的可用方向样式列表。它是以下样式的子集:

  • NA Desktop此样式生成适合打印的转弯说明。
  • NA Navigation此样式生成针对车载导航设备的转弯说明。
  • NA Campus此样式生成适合室内与室外步行路径的转弯说明。

代码实例

读取网络数据集并列出其支持的样式。

# 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 styles available in the network dataset
dir_styles = arcpy.na.ListDirectionsStyleNames(nds)

相关主题

5/10/2014