描述
Updates an extended property in the identified properties table for the chosen job.
警告:
This tool is designed to be run as a step in a Workflow Manager (Classic) workflow. Running this tool outside of Workflow Manager (Classic) does not honor all Workflow Manager (Classic) constraints such as job assignment, dependencies, or holds and may cause a job to enter an unusable state.
警告:
This tool is intended for use with the Topographic Mapping production workflows and will not support an improperly configured Workflow Manager (Classic) repository. Sample workflows and instructions for configuring Topographic Mapping production workflows are available as part of the product file installer.
使用方法
If the Increment Value parameter is checked, the value will be added to any existing value. If the extended property is a number, the value will be added to the existing value and the sum will be set for the extended property value. If the extended property is not a number, the value will be appended to any existing value.
Populate the Properties Table Name parameter with the name of the table only. It is not necessary to populate the full database path to the table or the qualified name of the table.
The table designated in the Properties Table Name parameter must be registered as an extended property table in Workflow Manager (Classic).
语法
UpdateExtendedProperty(job_id, properties_table_name, property_field, value, {increment_value}, {database_path})
参数 | 说明 | 数据类型 |
job_id | The Job ID of the Workflow Manager (Classic) job that will be updated. | Long |
properties_table_name | The name of the extended properties table that will be updated. | String |
property_field | The property to be updated in the extended properties table. | String |
value | The value that will be set for the extended property. | String |
increment_value (可选) | If a value already exists for the chosen property, this parameter specifies whether the increment value will be added to the current value or will replace the current value.
| Boolean |
database_path (可选) | The Workflow Manager (Classic) database connection file (.jtc) that contains the job information. If no connection file is specified, the current default Workflow Manager (Classic) database will be used. | File |
派生输出
名称 | 说明 | 数据类型 |
updated_job_id | Returns the Job ID of the updated Workflow Manager (Classic) job. | Long |
代码示例
This sample script increases the rework_count field in the TOPO_PRODUCTION_PROPERTIES table by 1.
# Name: UpdateExtendedProperty_sample.py
# Description: Sample script for running the Update Extended Property tool, and increasing the rework_count field in the
# TOPO_PRODUCTION_PROPERTIES table by 1
# Import System Modules
import arcpy
# Check Out Extensions
arcpy.CheckOutExtension('Foundation')
arcpy.CheckOutExtension('JTX')
# Setting the environment
arcpy.env.overwriteOutput = True
# Setting Local Variables
job_id = 2023
properties_table_name = 'TOPO_PRODUCTION_PROPERTIES'
property_field = 'rework_count'
value = 1
increment_value = 'INCREMENT'
database_path = r'C:\Data\Workflows\Testing.jtc'
# Calling the Update Extended Property tool to increase the value in the rework_count field by 1
arcpy.topographic.UpdateExtendedProperty(job_id, properties_table_name, property_field, value, increment_value, database_path)
# Getting all messages, warnings, and errors from the tool run and printing the results back to the user
messages = arcpy.GetMessages(0)
warnings = arcpy.GetMessages(1)
errors = arcpy.GetMessages(2)
arcpy.AddMessage('Tool Messages: {}\nTool Warnings: {}\nTool Errors{}\n'.format(messages, warnings, errors))
# Check In Extensions
arcpy.CheckInExtension('Foundation')
arcpy.CheckInExtension('JTX')
环境
许可信息
- Basic: 否
- Standard: 需要 Production Mapping and Workflow Manager
- Advanced: 需要 Production Mapping and Workflow Manager