描述
Creates a new product library in a geodatabase.
产品库是指地理数据库中的一系列表,它允许多用户环境对信息和行为加以集中以进行制图和数字数据生产。生产业务规则、文档和空间信息存储在产品库内,从而允许组织强制执行生产并进行标准化。数据模型信息、数据验证规则、地理范围、符号系统规则和地图文档均可作为生产业务规则的示例在产品库中进行管理。产品库工作空间是所有产品库相关工作流的必需输入。
使用方法
The Workspace for Product Library must be a geodatabase.
Use a path to an sde connection file if Workspace for Product Library references an enterprise geodatabase. The user credentials in the connection file must have permission to create data in the workspace.
可以对文件地理数据库和企业级地理数据库使用配置关键字。每个地理数据库类型和配置支持的配置关键字不同;但个人地理数据库不支持关键字。
要确定产品库路径,导航到产品库窗口中的项目,右键单击它,然后选择复制为路径。该产品库路径将被放置到剪贴板中。您可以将其粘贴到需要产品库路径的任何参数中。
语法
arcpy.production.CreateProductLibrary(product_library_workspace, {database_config_keyword}, {product_library_extension})
参数 | 说明 | 数据类型 |
product_library_workspace | The workspace that will store the product library. | Workspace |
database_config_keyword (可选) | 数据库存储或配置关键字。默认值为 Defaults。 | String |
product_library_extension (可选) | Indicates a product library type to create in the input workspace. If not set, a Production Mapping product library is created.
| String |
代码示例
CreateProductLibrary example (stand–alone script)
The following stand-alone script demonstrates how to use the CreateProductLibrary tool.
# Name: CreateProductLibrary_Example.py
# Description: Creates a new Product Library in a file geodatabase
# Requirements: Production Mapping extension
# import arcpy and checkout a Production Mapping license
import arcpy
arcpy.CheckOutExtension("foundation")
#Set local variables
product_library_workspace = "C:\\data\\productlibrary.gdb"
database_config_keyword = "DEFAULTS"
# create a product library
arcpy.CreateProductLibrary_production(product_library_workspace, database_config_keyword)
print "Script completed successfully."
# Check in the extension
arcpy.CheckInExtension("foundation")
环境
许可信息
- Basic: 否
- Standard: 需要 Production Mapping
- Advanced: 需要 Production Mapping