Rebuilding problem

2435
7
04-20-2011 09:01 AM
Highlighted
New Contributor III
In 9.3 when I needed to recreate the network I would delete the feature classes that made up the network and re-create them from source.

Under 10 it appears that you can't delete the feature classes that are associated with the transportation network.

Can someone from ESRI confirm whether this is the case?
Tags (2)
Reply
0 Kudos
7 Replies
Highlighted
New Contributor III
My mistake I was using 9.2.6.
Reply
0 Kudos
Highlighted
New Contributor III
Any suggestions on how to clear the data in the feature class and reload from source?  I see a DeleteFeatures_management command but I don't see one to AddFeatures.  

I've tried the arcpy.CopyFeatures_management() command but it won't work on a Locked file.
Reply
0 Kudos
Highlighted
New Contributor III
Hi Larry,

Even with ArcGIS 9.2 SP6 (or even ArcGIS 9.1 for that matter), you cannot delete a feature class when it is part of a network dataset. You must still first go into the Network Dataset Properties (Sources tab) and remove the feature class from the network dataset before it can be deleted.


Alan


That may have been your intent but I've got a python script that does just that.
Reply
0 Kudos
Highlighted
New Contributor III
I've attached a screen copy of the ArcCatalog for our 9.2.6 SDE database that shows I can delete the alleys that are part of the network
Reply
0 Kudos
Highlighted
New Contributor III
I've attached a better image that shows I can delete the alleys feature class and I include an image showing that it is part of the network.

When I try running the following code from ArcGIS 10/Python on a File GDB:

arcpy.geoprocessing.env.overwriteOutput = 1

arcpy.Select_analysis(DP3LW_TRANSE_CENTERLINE, Temp_Transe_Alleys, "CLASS_CODE = 14")
arcpy.CopyFeatures_management(Temp_Transe_Alleys, DP3LW_Transe_Alleys, "", "", "")
arcpy.CalculateField_management(DP3LW_Transe_Alleys, "SPEED", "10", "VB", "")

I got the following error:
arcpy.CopyFeatures_management(Temp_Transe_Alleys, DP3LW_Transe_Alleys, "", "", "")
File "C:\Program Files\ArcGIS\Desktop10.0\arcpy\arcpy\management.py", line 1943, in CopyFeatures
raise e
ExecuteError: ERROR 000601: Cannot delete C:\Temp\DestinationFiles.gdb\TRANSE\Transe_Alleys. May be locked by another application.

Since you say this shouldn't happen I'll bring it up with ESRI Support Canada.

Here is the code I have been using on an SDE 9.2.6 Oracle database and it works fine.

# Select all Alleys and set their speed value to 10
gp.Delete_management(DP3LW_Transe_Alleys, "FeatureClass")

gp.Select_analysis(DP3LW_TRANSE_CENTERLINE, DP3LW_Transe_Alleys, "CLASS_CODE = 14")
gp.CalculateField_management(DP3LW_Transe_Alleys, "SPEED", "10", "VB", "")
Reply
0 Kudos
Highlighted
New Contributor III
I forgot to add the latest image.
Reply
0 Kudos
Highlighted
New Contributor III
I'm experiencing a simlar problem when I'm trying to rebuild a network. I added a planned roadway segment and when I rebuild the network, I get the following error: "Build network dataset failed. The logical network is of an older version and does not support the requested functionality." I've done this in 9.3 several times and this is a first. I created the FileGeodatabase and network in ArcMAP10, so I'm not sure why it's calling it an older version. Any guidance is much appreciated.

Thanks.
Reply
0 Kudos