mxd = arcpy.mapping.MapDocument("current") #or provide full path to MXD df = arcpy.mapping.ListDataFrames(mxd, "df name") #replace with actual df name lyr = arcpy.mapping.ListLayers(mxd, "MyShapeFileLayer")[0] #replace with acutal layer name in TOC arcpy.mapping.RemoveLayer(df, lyr) mxd.save()
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.