ListDataStoreItems (arcpy)
摘要
返回在 ArcGIS Server 站点注册的文件夹或数据库列表。
讨论
有关应在 ArcGIS Server 上注册数据的时间和原因,请参阅关于将您的数据注册到服务器。
语法
ListDataStoreItems (connection_file, datastore_type)
参数 | 说明 | 数据类型 |
connection_file |
An ArcGIS Server connection file (.ags) for the server whose registered databases or folders you want to list. If you've made a connection in the Catalog window of ArcMap, you can use the connection file found in your user profile directory. Alternatively, you can create a connection file from scratch using the function CreateGISServerConnectionFile. | String |
datastore_type | The type of data that you want to list.
| String |
数据类型 | 说明 |
String |
使用 [store_name, server_data, publisher_data, type] 格式以字符串列表的形式返回已注册的文件夹或数据库。
|
代码实例
ListDataStoreItems 示例
打印所有注册到 ArcGIS Server 站点上的文件夹。
import arcpy
print("Registered FOLDER items are:")
for item in arcpy.ListDataStoreItems("GIS Servers/MyConnection.ags", "FOLDER"):
print("Name: " + item[0])
print("Server's path: " + item[1])
print("Publisher's path: " + item[2])
if item[3] == "managed":
print("This is ArcGIS Server's Managed Database")
print("")
相关主题
9/15/2013