0

I'm trying to use arcpy.AddFieldToAnalysisLayer_na using a network analysis layer

def fonction(network):
 in_network_dataset = network
 out_network_analysis_layer = "Best_Route"
 impedance_attribute = "length"
 field_name = "IIDTSTARCO"
 field_type = "LONG"

#I create my network analysis layer
 arcpy.MakeRouteLayer_na(in_network_dataset,out_network_analysis_layer,impedance_attribute)

#and then I want to add a field to PolylineBarriers sublayer

 arcpy.AddFieldToAnalysisLayer_na(out_network_analysis_layer, "PolylineBarriers", field_name, field_type)

When I run the script I get the following error:

ERROR 000800: The value is not a member of  Stops | Barriers | Routes | PolylineBarriers | PolygonBarriers

while "PolylineBarriers" is in the list

  • 2
    Are you really using ArcGIS 10.0, as the question is tagged? That is really ancient software (10.2.2 was recently retired), which makes it unlikely that anyone else could use it to test the reproducibility of your problem. If you are using something more current, then please Edit the question to specify the exact software release. – Vince Jul 18 at 13:28
  • Yes, unfortunately, I still use ArcGIS 10.0 – Guillaume Lallement Jul 18 at 15:04
  • Then all you can do is apply SP5 and hope it's magically fixed. – Vince Jul 18 at 19:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.