AE实现擦除Erase报错

问题描述

环境vs2010+c#+Arcgis10.1代码如下:Geoprocessorgp=newGeoprocessor();gp.OverwriteOutput=true;gp.AddOutputsToMap=true;Eraseerase=newErase();erase.in_features=@"D:tempss.shp";erase.erase_features=@"D:tempsss.shp";erase.out_feature_class=@"D:tempq.shp";IGeoProcessorResultresult=(IGeoProcessorResult)gp.Execute(erase,null);调试报错:未处理System.Runtime.InteropServices.COMExceptionMessage=对COM组件的调用返回了错误HRESULTE_FAIL。Source=ESRI.ArcGIS.GeoprocessingErrorCode=-2147467259StackTrace:在ESRI.ArcGIS.Geoprocessing.GeoProcessorClass.Execute(StringName,IVariantArrayipValues,ITrackCancelpTrackCancel)在ESRI.ArcGIS.Geoprocessor.Geoprocessor.ExecuteInner(IGPProcessprocess,ITrackCanceltrackCancel,IGeoProcessorigp,IVariantArrayiva)在ESRI.ArcGIS.Geoprocessor.Geoprocessor.Execute(IGPProcessprocess,ITrackCanceltrackCancel)在DesktopWindowsApplication1.Form1.图层属性ToolStripMenuItem_Click(Objectsender,EventArgse)位置D:VS_WorkspaceDesktopWindowsApplication1DesktopWindowsApplication1Form1.cs:行号78在System.Windows.Forms.ToolStripItem.RaiseEvent(Objectkey,EventArgse)在System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgse)在System.Windows.Forms.ToolStripItem.HandleClick(EventArgse)在System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgse)在System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgse,ToolStripItemEventTypemet)在System.Windows.Forms.ToolStripItem.FireEvent(EventArgse,ToolStripItemEventTypemet)在System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgsmea)在System.Windows.Forms.Control.WmMouseUp(Message&m,MouseButtonsbutton,Int32clicks)在System.Windows.Forms.Control.WndProc(Message&m)在System.Windows.Forms.ScrollableControl.WndProc(Message&m)在System.Windows.Forms.ToolStrip.WndProc(Message&m)在System.Windows.Forms.MenuStrip.WndProc(Message&m)在System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&m)在System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&m)在System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtrhWnd,Int32msg,IntPtrwparam,IntPtrlparam)在System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&msg)在System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtrdwComponentID,Int32reason,Int32pvLoopData)在System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32reason,ApplicationContextcontext)在System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32reason,ApplicationContextcontext)在System.Windows.Forms.Application.Run(FormmainForm)在DesktopWindowsApplication1.Program.Main()位置D:VS_WorkspaceDesktopWindowsApplication1DesktopWindowsApplication1Program.cs:行号18在System.AppDomain._nExecuteAssembly(RuntimeAssemblyassembly,String[]args)在System.AppDomain.ExecuteAssembly(StringassemblyFile,EvidenceassemblySecurity,String[]args)在Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()在System.Threading.ThreadHelper.ThreadStart_Context(Objectstate)在System.Threading.ExecutionContext.Run(ExecutionContextexecutionContext,ContextCallbackcallback,Objectstate,BooleanignoreSyncCtx)在System.Threading.ExecutionContext.Run(ExecutionContextexecutionContext,ContextCallbackcallback,Objectstate)在System.Threading.ThreadHelper.ThreadStart()InnerException:试过网上找的方法:1.在控制面板--->管理工具--->服务中,开启DistributedTransactionCoordinator服务。  2.打开控制面板--->管理工具--->组件服务--->选择计算机--->我的电脑--->右击属性--->选择MSDTC--->选择安全配置勾选事务管理器通信中的允许出站、允许入站和不要求进行验证。重启后依然无效,求救各位大神!!!

解决方案

解决方案二:
借鉴
解决方案三:
非常感谢你的回答,你给的网站还是有很多东西可以借鉴学习的。这个问题已经解决http://blog.csdn.net/wanderinglove/article/details/25773681特别要注意授权问题
解决方案四:

解决方案五:
你是怎么处理的,楼主?

时间: 2024-10-31 03:17:55

AE实现擦除Erase报错的相关文章

AE开发,鹰眼,提示报错

问题描述 IGraphicsContainerpGraphicsContainer=axMapControl2.MapasIGraphicsContainer;处提示报错引发类型为"System.Windows.Forms.AxHost+InvalidActiveXStateException"的异常.将axMapControl2换成axMapControl1可以运行,代码应该没什么问题privatevoidaxMapControl1_OnExtentUpdated(objectsen

【Shell】fix 1032报错信息的脚本

 生产环境总会遇到由于各种原因导致的主从复制不一致的情况,导致slave出现 1032报错.为了使主从关系能够稳定的运行,大多时候可以选择修复1032 报错 ,先跳过去 ,然后使用 percona  的工具 pt-table-checksum 和 pt-table-sync 进行校验和修复 .  修复1032 error的脚本如下: #!/bin/sh # fetch port 1032 error recored to /tmp/record.bashc.1032.$port # parame

arcgis-ae+c#中返回距离函数报错

问题描述 ae+c#中返回距离函数报错 IFeatureLayer aFL = axMapControl1.Map.get_Layer(0) as IFeatureLayer; IFeatureLayer bFL = axMapControl1.Map.get_Layer(1) as IFeatureLayer; IFeatureClass aFClass = aFL.FeatureClass; IFeatureCursor aFC = aFClass.Search(null, true); I

api-AE + c# 开发 pTopologicalOper.Difference算法 API报错

问题描述 AE + c# 开发 pTopologicalOper.Difference算法 API报错 //原始线图层 IFeatureClass pFeatureClass = pLayer.FeatureClass; //获取要素 IFeature pFirstFeature = pFeatureClass.GetFeature(85); IFeature pSecondFeature = pFeatureClass.GetFeature(420); //获取Geomtry并统一投影坐标系

数据库open报错ORA-01555问题

管理的测试库出问题了,无法open,我们先来看看是什么问题: Recovery of Online Redo Log: Thread 1 Group 4 Seq 4 Reading mem 0 Mem# 0: /onlinelog/shr/redo04.log Completed redo application of 0.00MB Completed crash recovery at Thread 1: logseq 4, block 3, scn 7755957 0 data blocks

hadoop-hive连接mysql 报错 readonly server

问题描述 hive连接mysql 报错 readonly server 各位大侠,我搭建了一个hadoop环境,用hive做数据仓库,mysql做hive的元数据仓库,用于定时分析用户数据中的日志文件,但在hive访问mysql的过程中,不定时的报如下错误: java.sql.SQLException: Query returned non-zero code: 1, cause: FAILED: Execution Error, return code 1 from org.apache.ha

dubbo-DUBBO启动报错找不到服务

问题描述 DUBBO启动报错找不到服务 ERROR 10:16:41,178 AbstractClient: - [DUBBO] Failed to start NettyClient caedmon-PC/192.168.0.234 connect to the server /60.191.124.236:21890 (check == false, ignore and retry later!), cause: client(url: dubbo://60.191.124.236:218

Centos/linux安装vmware-tools工具报错解决、yum配置

1.vmware tools"就等于装虚拟机的显卡驱动,如果不装"vmware tools",则虚拟机的分辨率会很低且无法正常显示或工作. 2.tools可是将主机的驱动都复制到虚拟机,比如你设置的默认使用主机声卡驱动,cpu,显卡,都有,主机我的电脑-右键-设备管理器,里面的驱动都可以安装到虚拟机里 3.还有就是可是设置虚拟机与主机共享文件夹,host\打头的      linux vmware-tools 主要作用说白了就是:实现linux到XP界面 鼠标的自由切换(不用

c-DC++报错,操作系统实验,求帮忙改正

问题描述 DC++报错,操作系统实验,求帮忙改正 #include #include #define NULL 0 #define LEN1 sizeof(struct job)//作业大小 #define LEN2 sizeof(struct idle)//空闲区单元大小 #define LEN3 sizeof(struct allocate)//已分配区单元大小 int SPACE=100;//定义内存空间大小 int ORIGI=1;//定义内存起始地址 struct job//定义作业