arcgis engine 中如何判读选中的元素是指北针、图例或比例尺等类型元素?
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了arcgis engine 中如何判读选中的元素是指北针、图例或比例尺等类型元素?相关的知识,希望对你有一定的参考价值。
我在arcgis engine里用select elements 工具选中了一个元素,想要判读一下类型,然后弹出相对应的属性对话框,可不知为啥判断不出来。。。求救呀。。。比如里面的指北针吧,我用断点跟踪,就是进不去。。
//先判断是否为mapSurroundFrame
if(pelement is IMapSurroundFrame)
//然后将pelement 转为IMapSurroundFrame
iMapsurroundFrame psurround=pelement as iMapsurroundFrame;
//然后判断是否为图例、指北针、比例尺等等
if (psurround.MapSourround is ILengend)
else if(psurround.MapSourround is INorthArrow)
参考技术B
送你几个参考资料demo...
ArcGIS Engine -- 常用方法
空间关系


计算范围

查询

查找图层


选择要素集

加载数据


新建shapefile文件/GDB

将选中要素另存至GDB
另存为shapefile类似,修改workspacefactory为ShapefileWorkspaceFactoryClass,修改对应路径即可。

编辑


label


GP
转换cad时,从shp转换cad不成功,从gdb中转换成功,原因不知。
GP:createCadXData需要在转换cad之前执行,给cad添加扩展属性




地图显示/刷新




Element


以上是关于arcgis engine 中如何判读选中的元素是指北针、图例或比例尺等类型元素?的主要内容,如果未能解决你的问题,请参考以下文章