AnsweredAssumed Answered

Python code for exporting multiple layers?

Question asked by t.faull on Dec 9, 2016
Latest reply on Dec 15, 2016 by BWhite-esristaff

Hi everyone,

I have 10 layers in my MXD. Each layer's attribute table has a text field called 'Contractor'. This field has a few different values in it, but I'm only concerned with ones that contain the word 'TLG' or 'TLG[extra bits of text]'

I want to export each layer to create 10 new shapefiles in a seperate folder. But only exporting the records where 'Contractor' = 'TLG' or 'TLG%'

 

At the moment I go into each layer, select all the records that include TLG and right click layer>export data (selected records only).

This is a manual slow process which I repeat every week or so when updating our clients with shapefile data.

 

ArcMap 10.4.

 

Thanks!!!

 

(I would like to use the geoprocessing>python console window if possible. I've used that before, so it's familiar to me!)

Outcomes