Select to view content in your preferred language

Utilities Abandon Features Tool Not Working with Enterprise Geodatabase?

4219
16
Jump to solution
05-10-2013 06:07 AM
AlanToms
Regular Contributor
Hello,

I am having an issue with the Abandon Features script from the Water Utility Network Editing tools.

I am trying to abandon a feature from the wMain feature class.  If the the abandon features are set to go to the wAbandonedLine feature class on my enterprise geodatabase it will fail with the below message.  If I set it to the wAbandonedLine in the file geodatabase that came with the tools it works fine.  It is a 10.1 SP1 environment.  The enterprise geodatabase is using the SQL geometry spatail type.  Any ideas?


Executing: AbandonFeatures 'Water Mains' "Water Abandoned Lines" "Water Abandoned Points" true LINETYPE POINTTYPE "Record Set"
Start Time: Fri May 10 09:05:12 2013
Running script AbandonFeatures...
Starting Abandon Selected Features Script
Processing Parameters
Abandoning Selected Features in GISData.GISADMIN.wMain
Water Mains is a Polyline with 1 selected
Traceback (most recent call last):
  File "C:\IS_Support\UtilityNetworkEditingfor10.1\Application\Abandon Tools\AbandonSelectedFeatures.py", line 204, in <module>
    newRow.setValue(fieldName, row.getValue(fieldName))
  File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\arcobjects\arcobjects.py", line 1040, in setValue
    return convertArcObjectToPythonObject(self._arc_object.SetValue(*gp_fixargs(args)))
RuntimeError: ERROR 999999: Error executing function.
Field is not editable.
ERROR 999999: Error executing function.
Field is not editable.
Script Complete
Completed script AbandonFeatures...
Failed to execute (AbandonFeatures).
Failed at Fri May 10 09:05:13 2013 (Elapsed Time: 1.00 seconds)
0 Kudos
1 Solution

Accepted Solutions
PaulLeBlanc1
Esri Regular Contributor

Lance,

We recently released a preview version of the abandon/unabandon tools that fixes the issue of non-editable fields + a host of others. You can find it here.

View solution in original post

16 Replies
MikeMillerGIS
Esri Frequent Contributor
Alan,
   Are both the water layers and the abandon layers editable?
0 Kudos
AlanToms
Regular Contributor
Alan,
   Are both the water layers and the abandon layers editable?


Yes, I can edit the feature classes.
0 Kudos
AlanToms
Regular Contributor
I do have a few additional fields in the wMain feature class that are not part of the local gov schema, but I don't think that is the issue because the tool works when it outputs to the file geodatabase.  /shrug
0 Kudos
MikeMillerGIS
Esri Frequent Contributor
Are you in an edit session and you can edit both layers when you run the tools?
0 Kudos
MikeMillerGIS
Esri Frequent Contributor
Alan,
   I just tested the tools using a SQL Server based GDB and they work.  Both the Abandon and the Network layers need to be editable and an active edit session needs to be started.  This was using the sample data provided. 

If you can repro the issue with your instance, can you log a tech support call?  It could be something with the additional fields.  Did you add fields to the abandon layers?  If so, it trys to loop through them and if it finds them in the network layers, it trys to copy them.
0 Kudos
AlanToms
Regular Contributor
Are you in an edit session and you can edit both layers when you run the tools?


Yes I have been in an edit session and verified I could edit when I attempted to run the tool.  The tool still does fails when selecting the abandoned features on the enterprise database.
0 Kudos
LanceCole
MVP Regular Contributor

I just ran into this on the newest version (2/2017) as well, on both GBD and SDE enterprise databases.  After looking into the issue further found the python scripts AbandonFeatures.py and UnAbandonAssets.py were trying to modify the GlobalID fields which are not editable.  If your database is not utilizing Global id's the script works great.  To correct this three lines of code need to be modified to exclude modifying the GlobalID values.  In  AbandonFeatures.py lines 203 and 244 by appending code to exclude GlobalID.

202 for fieldName in fieldListLines:
203    if fldInfo.findFieldByName(fieldName) >= 0 and fieldName != "GlobalID":
204       arcpy.AddMessage("fieldName: " + fieldName)
205       newRow.setValue(fieldName, row.getValue(fieldName))

...

243 for fieldName in fieldListPoints:
244    if fldInfo.findFieldByName(fieldName) >= 0 and fieldName != "GlobalID":
245       newRow.setValue(fieldName, row.getValue(fieldName))
‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

And in line 205 of UnAbandonAssets.py the same.

204 for fieldName in fieldList:
205    if targetFldInfo.findFieldByName(fieldName) >= 0 and fieldName != "GlobalID":
206       newRow.setValue(fieldName, row.getValue(fieldName))‍‍‍‍‍‍
0 Kudos
PaulLeBlanc1
Esri Regular Contributor

Lance,

We recently released a preview version of the abandon/unabandon tools that fixes the issue of non-editable fields + a host of others. You can find it here.

LanceCole
MVP Regular Contributor

Paul,

Thanks for the updated tools, they appear to be working. I did find one

other sudo glitch.

When you unabandon Water Hydrant Valves or Water System Valves they do not

initially show. The “HYDRFLAG” comes back in as NULL and will not display

because of the Definition Query on these two layers. I reset one layer to

include “OR HYDRFLAG IS NULL” so it will at least display.

0 Kudos