Note - the best, most conistent way to get extent is if you are saving your map document in Layout View. If your map document is in Data View, your extent may change based on the resizing of application windows.Same applies to getting and setting scale.Jeff
import arcpy import arcpy.mapping ## Sets the MXD file IMXD = arcpy.mapping.MapDocument("CURRENT") ## Sets the Dataframe DF = arcpy.mapping.ListDataFrames(IMXD, "Layers")[0] print DF.extent
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.