Default field value problems: ArcGIS scripting
#1
Posted 13 December 2012 - 12:56 PM
The default values are being assigned by the script based on certain parameters, and in ArcCatalog the feature class properties are showing the correct default values after the script has run, but the new records all have <NULL> values.
Has anyone run into some limitation that prevents default field values from being applied on append?
Owner: Springer Cartographics LLC
Director of Design and Web Applications: ALK Technologies Inc.
Chief Creative Officer: Dashflo.com
#2
Posted 13 December 2012 - 10:37 PM
-Jacob
I have a couple of ArcGIS 10.1 (SP1) Python scripts that are appending new rows to various feature classes. I have used "Assign Default To Field" to set field values for the new rows. However for certain feature classes the default values are not being applied on append. There doesn't seem to be any differences in the schema of a feature class that works and one that doesn't.
The default values are being assigned by the script based on certain parameters, and in ArcCatalog the feature class properties are showing the correct default values after the script has run, but the new records all have <NULL> values.
Has anyone run into some limitation that prevents default field values from being applied on append?
#3
Posted 14 December 2012 - 10:06 AM
If my memory serves, appended features aren't treated as "new" features, so the default values won't apply. The Append function is taking the source feature's attributes at face value in the copy, even the nulls. The best you can do is set a follow-up routine to apply defaults to null-valued attributes after the append.
-Jacob
Owner: Springer Cartographics LLC
Director of Design and Web Applications: ALK Technologies Inc.
Chief Creative Officer: Dashflo.com
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users


Sign In
Create Account

United States
Back to top









