List Elements or Datasets of a given Layer

المشرف العام

Administrator
طاقم الإدارة
I am sorry of this might sound like a noob question but I cannot find any answer from google.

I used arcpy to do batch processing of Network Analyst - Make Service Area layer of thousand of stores.

Everything went well except now, I am stuck with layer (.lyr) files and I would like to conduct further analysis on the datasets that they contain.

Basically I would have

"SA_Store_001.lyr" (and so on..)And when I open this inside ArcMap, it has the usual elements of the Service Area Analysis.

including

"Facilities""Route Barriers""Polygons"etc.Suppose, I would like to SelectAttributes by polygons, can you give me a skeleton code for this? The help files on ArcGIS on has SelectLayerByAttribute -- what I want is the Polygons.

Unfortunately, this didn't work:

Even the first line doesn't work (because I don't know how to deal with the .lyr file type)

inputLayer = 'D:\\ARCGIS\\FoodSystemsAnalysis\\Coverage\\Auckland\\SMC_SM_Ta9.lyr'arcpy.MakeFeatureLayer_management(inputLayer, "SMC_Ta9")
arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid. ERROR 000840: The value is not a Feature Layer. Failed to execute (MakeFeatureLayer).

I think the MakeFeatureLayer_management takes features as input.



أكثر...
 
أعلى