Length—The length value of the field to be modified. The field length should be between 1 and the length of the database field.
Variable Length—Specifies if the Length value is a variable value or a fixed value.
Enable Padding—Specifies if the field supports padding.
Padding Character—The padding character for the field. The default is a space.
Padding Location—Specifies where the padding should be applied to the field value.
LEFT—The padding characters will be added to the left of the value in the field. This is the default.
RIGHT—The padding characters will be added to the right of the value in the field.
LEFT_AND_RIGHT—The padding characters will be added to the left and right of the value in the field.
Pad if Null—Specifies if the padding characters are added when the field has a null value.
Allow Null Values—Specifies if the field supports null values.
Value Table
派生输出
名称
说明
数据类型
out_feature_class
更新的网络要素图层。
Feature Layer
代码示例
ModifyRouteIdPadding 示例 1(Python 窗口)
本示例演示了如何在 Python 窗口中使用 ModifyRouteIdPadding 函数。
arcpy.env.workspace = r"C:\Data\DOT.gdb"
arcpy.locref.ModifyRouteIdPadding("StateRoutes", "RouteSystem 3 false true @ LEFT false false;RouteNumber 10 true true 0 LEFT true true")
ModifyRouteIdPadding 示例 2(独立脚本)
本示例演示了如何在独立 Python 脚本中使用 ModifyRouteIdPadding 函数。
# Name: ModifyRouteIdPadding_standalone.py
# Description: Modifies the padding, null, and length properties for fields that are part of a multifield route ID in a stand-alone script.
# Requires: ArcGIS Location Referencing
# Import arcpy module
import arcpy
# Set local variables
in_feature_class = r"C:\Data\DOT.gdb\LRS\StateRoutes"
# Values format: "Field Length VariableLength EnablePadding PaddingCharacter PaddingLocation PadifNull AllowNullValues;Field2......"
route_id_padding = "RouteSystem 3 false true @ LEFT false false;RouteNumber 10 true true 0 LEFT true true"
# Run the tool
arcpy.locref.ModifyRouteIdPadding(in_feature_class, route_id_padding)