AE开发常见问题

1、 问题:  Arcgis10.0 组件初始化失败


解决方法:  ESRI.ArcGIS.RuntimeManager.BindLicense(ESRI.ArcGIS.ProductCode.EngineOrDesktop);该语句需要引用ESRI.ArcGIS.Version类库


 


2、 问题:  无嵌入互操作类


解决方法:  嵌入互操作类 改为 false


 在VS2010中,使用.NETFramework 4.0环境时,ESRI的类库嵌入式互操作属性需要设置为False。


 


3、向axMapControl控件中添加shp报错


问题:向axMapControl控件中添加shp时,出现了“The specified path is invalid”这个错误,仔细检查代码并无错误;而从文件添加Layer则可以,但ToolBarControl无显示。


解决方法:添加axLicenseControl 控件


 


4、 问题:


解决方法:


   //清除数据集前必须先刷新            


   activeView.PartialRefresh(esriViewDrawPhase.esriViewGeoSelection,mapControl.get_Layer(0),null);            


  mapControl.Map.ClearSelection();                   


  activeView.PartialRefresh(esriViewDrawPhase.esriViewGeoSelection, mapControl.get_Layer(0), null);


5、连接SDE空间数据库时出错


 
1、SDE认证问题: 使用ArcGIS.KeyGen.exe生成一个epp文件 方法:-->server-->All-->拷贝并保存为*.epp文件。认证时加载该文件即可认证完毕。


2、实例问题: 必须是这样的:"sde:sqlserver:SHENC-PC\\SQLEXPRESS"


3、可选  pPS.SetProperty("AUTHENTICATION_MODE", "DBMS");


 


6、找不到ESRI.ArcGIS.Utility;的引用  


  在ArcGIS10环境中找不到ESRI.ArcGIS.Utility、ESRI.ArcGIS.Utility.BaseClasses等引用,ArcGIS9.2之后Utility会逐渐被丢弃的,转而用ADF来代替,把ESRI.ArcGIS.Utility和ESRI.ArcGIS.Utility.BaseClasses改为ESRI.ArcGIS.ADF、ESRI.ArcGIS.ADF.BaseClasses问题解决。
 
另外,9.2中ADF类的引用为ESRI.ArcGIS.ADF和ESRI.ArcGIS.ADF.Connection
在10.0中改为ESRI.ArcGIS.ADF.Local和ESRI.ArcGIS.ADF.Connection.Local
 
7、问题:AxSybologyControl依据ArcGis安装路径,加载自带信息,报“为实例化错误!”
     
解决方法: // Microsoft.Win32.RegistryKey regKey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\\ESRI\\CoreRuntime", true);
      //将CoreRuntime改为安装目录Desktop10.0
                Microsoft.Win32.RegistryKey regKey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\\ESRI\\Desktop10.0", true);
 
 
8、问题:CreateFeatureDataset()失败 报“no License”错误
    featureDataset = featureWorkspace.CreateFeatureDataset(featureDSName, spatialReference);
解决方法:
  直接 在 license Control 中 修改  属性 选中  extention 项 选中:spatial analyst   或
先:
    esriLicenseStatus licenseStatus = esriLicenseStatus.esriLicenseUnavailable;
            IAoInitialize m_AoInitialize = new AoInitializeClass();
            licenseStatus = m_AoInitialize.Initialize(esriLicenseProductCode.esriLicenseProductCodeArcInfo);
            licenseStatus = m_AoInitialize.CheckOutExtension(esriLicenseExtensionCode.esriLicenseExtensionCodeSpatialAnalyst);
9、问题:在窗口里的层层嵌套SplitContainer后,出现最内层SplitContainer内部TocControl控件图层无法显示问题
解决方法:
加载完mxd后代后加上axTOCControl1.SetBuddyControl(axMapControl1)即可解决。不过若很多地方要加载mxd话,需要每个地方要加。最佳方法是在代码最开始执行的地方加上。
 
10、
问题:feature.Delete() 时,对 COM 组件的调用返回了错误 HRESULT E_FAIL


解决方法 :  把featureCursor = featureclass.Search(null, true);          //共享内存


      改成featureCursor = featureClass.Search(null, false);                   //不共享内存


1
2
3
4
5
6
7
8
9
10
11
//清除图层原有实体对象
           //featureCursor = featureClass.Search(null, true);
           featureCursor = featureClass.Search(null, false);                   //不共享内存
           IFeature feature;
           feature = featureCursor.NextFeature();
           while (feature != null)
           {
               feature.Delete();                                  
               //featureCursor.DeleteFeature();
               feature = featureCursor.NextFeature();
           }
 


 11、问题:featureBuffer.Shape = geometry;时 报“No support for this geometry type”错误
解决方法:查看FeatureClass中geometry type是否与 geometry中geometry type相同。




 
12、9.x中ESRI.ArcGIS.Display.tagRECT在10.x中改为ESRI.ArcGIS.esriSystem.tagRECT
 
13、在64位操作系统中需要在项目的编译选项中,将Target CPU选择为x86?
 
14、IMap.ClipGeometry在10.x中需要结合IMapClipOptions接口一起使用?
 
15、问题:You are not licensed for ArcInfo


  Use the ArcGIS Administrator to view the software availability,change the license manager,or switch the ArcGIS software product.
  
 
  解决方法:  1、可尝试:解决办法启动ArcGIS License Manager服务()。若没有
         2、使用ArcGIS.KeyGen.exe生成一个License,覆盖service.txt内容,并在 lincense Adiministrator 中 刷新 及 修改。。 为 localhost
16、未认证问题:the application is not licensed to perform this operation
解决方法:方法一:看是否将ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.EngineOrDesktop);错写成了:
        ESRI.ArcGIS.RuntimeManager.BindLincense(ESRI.ArcGIS.ProductCode.EngineOrDesktop);
      方法二:将LicenseControl控件初始化为 第二项:geodatabase
 
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值