打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
Solved: Add data into ArcMap from geodatabase using Python
userphoto

2022.09.23 四川

关注
# Option A : When you're executing code in-process # import arcpy # Use this line if you're not sure if it's already true arcpy.env.addOutputsToMap = True # Executing tool will automatically add layer to map arcpy.management.MakeFeatureLayer(r"Path\To\GDB\FeatureClass", "NameForLayer") # Option B : When you're executing code out-of-process # import arcpy # Hook into the map document mxd = arcpy.mapping.MapDocument(r"Path\To\MapDocument") # Hook into the data frame where you want to add the layer df = arcpy.mapping.ListDataFrames(mxd)[0] # Create a Layer object lyr = arcpy.management.MakeFeatureLayer(r"Path\To\GDB\FeatureClass", "NameForLayer").getOutput(0) # Add the layer object to the map arcpy.mapping.AddLayer(df, lyr)
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
Python导入shapefile
arcpy自动制图实战(arcpy.mapping迁移至arcpy.mp)
搜罗全网!ArcGIS二次开发Python(arcpy)指南(二):超详细文件存取指南 有这一篇就够了
重采样
Struts预定义的三种重要Action类
extjs中一个combobox怎么完成二级联动
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服