ESRI AppRef 抛出 Com 8000FFFF 错误
我正在使用 arcGIS api 为 arcFM 制作插件,当我尝试运行此代码时,
Type t = Type.GetTypeFromProgID("esriFramework.AppRef");
System.Object obj = Activator.CreateInstance(t);
pApp = obj as IApplication;
我得到了
System.Runtime.InteropServices.COMException(0x8000FFFF): Creating an instance of the component with CLSID {Appref CLSID HERE} from the IClassFactory faileddue to the following error: 8000ffff
谢谢
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是不可能的我需要使用 arcMap 而不是 ArcFM
This was impossible i needed to be using arcMap not ArcFM
在AppRef CoClass文档中,它说:
论坛帖子似乎确认这与违反此约束时出现的错误相同:
来自 http://forums.esri.com/Thread.asp?c=93&f=1729&t=217861:
看起来上述论坛帖子的 OP 能够通过“使用 IToolboxWorkspace 并直接访问 Esri 工具箱”来解决他们的问题。这是她的代码:
也许您可以在没有 AppRef 对象的情况下或通过从应用程序内部运行脚本来实现您的目标。
In the AppRef CoClass documentation, it says:
Forum posts seem to confirm that this is the same error which is seen when this constraint has been violated:
From http://forums.esri.com/Thread.asp?c=93&f=1729&t=217861:
It looks like the OP of the above forum post was able to get around their problem by "using IToolboxWorkspace and accessing directely the Esri-toolboxes". This was her code:
Perhaps you can accomplish your goal either without the AppRef object or by running your script from inside the application.