definition query results to new mxd

Discussion created by joshist on Jun 27, 2011
Latest reply on Jun 29, 2011 by joshist
I have 100 layers in my existing mxd. I am looping through each layer and using a definition query to it to extract features of a paticular project. Each loop gives me the result of the query which I want to add to a new mxd. HOw can I acheive this or is there a better way to do that.

for lyr in arcpy.mapping.ListLayers(mxd):
  lyr.definitionQuery =  transformation_transaction_id = '101551'

Thank you.I really appreciate the help.