>>> mxd = arcpy.mapping.MapDocument('current') # using current map, can also use a path to a mxd here >>> df = arcpy.mapping.ListDataFrames(mxd)[0] >>> lyr = arcpy.mapping.ListLayers(mxd, 'U.S. States*', df)[0] >>> ext = lyr.getExtent() >>> df.extent = ext
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.