Is there a way to select a layer?

Discussion created by Sycosys on Mar 20, 2012
Latest reply on Mar 21, 2012 by Sycosys

So my code looks for a layer name called flow then proceeds to attempt to zoom to that layer.

The problem i have right now is i cant figure out how to select the layer which i know is being correctly identified in my If statements so that I can zoom to it.

for lyr in layerlist:
# if the long layer name does not equal the short layer name
 if lyr.longName !=
     #Find Layer with name == "flow"

     if == "flow":

  #Pan to Extent of Flow Layer
                 df.extent = lyr.getExtent()
                 print extent