The Python code fieldmappings.addTable() does not return all fields.
ArcGIS Pro
漏洞 ID 编号
BUG-000158537
已提交
May 24, 2023
上次修改时间
March 26, 2025
适用范围
ArcGIS Pro
找到的版本
3.1.1
操作系统
Windows OS
操作系统版本
10.0 64 Bit
状态
Known Limit
经开发团队审核,已确定此问题与不受 Esri 控制的软件的已知限制有关。 问题的“其他信息”部分可能包含进一步说明。
附加信息
This is a known limitation. Any required or geodatabase-managed fields are not loaded into the field map by default. If editor tracking fields are needed, they can be added to the field map in the following script:
```fc = "DBO.Points"desc = arcpy.Describe(fc)fms = arcpy.FieldMappings()fms.addTable(fc)if desc.editorTrackingEnabled: tracking_fields = [ desc.creatorFieldName, desc.createdAtFieldName, desc.editorFieldName, desc.editedAtFieldName ] for tf in tracking_fields: fm = arcpy.FieldMap() fm.addInputField(fc, tf) fms.addFieldMap(fm)arcpy.conversion.ExportFeatures(fc, "memory/test", field_mapping=fms)```For more information on accessing tracking field information via arcpy.Describe(), see https://pro.arcgis.com/en/pro-app/latest/arcpy/functions/editor-tracking-properties.htm