>>> 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
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.