AnsweredAssumed Answered

Closest Facilities analysis

Question asked by dbattad001 on Nov 22, 2017
Latest reply on Apr 5, 2018 by dbattad001

I have a script to do a closest facility analysis using Network Analyst. The script works very well until the last line where I want to save the layer as a feature class.

 

I get an error message.

 

Excerpt of the script;

###############

print "Solving"
    #Solve the closest facility layer
    arcpy.na.Solve(layer_object)

   

 

   # Get the output layer and save it to a feature class

    arcpy.management.CopyFeatures(layer_object, outRoutesFC)

 

#############

 

This is the error message:

 

Processing T1 routes
Solving
An error occured on line 85
Failed to execute. Parameters are not valid.
ERROR 000840: The value is not a Feature Layer.
ERROR 000840: The value is not a Raster Catalog Layer.
Failed to execute (CopyFeatures).

 

 

I will appreciate any help. Thanks.

 

Dionisio

Outcomes