乐筑天下

搜索
欢迎各位开发者和用户入驻本平台 尊重版权,从我做起,拒绝盗版,拒绝倒卖 签到、发布资源、邀请好友注册,可以获得银币 请注意保管好自己的密码,避免账户资金被盗
查看: 31|回复: 2

CAD 错误

[复制链接]

1

主题

1

帖子

1

银币

初来乍到

Rank: 1

铜币
5
发表于 2012-5-14 14:22:00 | 显示全部楼层 |阅读模式
dynamic  = AutomationFactory.CreateObject("AutoCAD.Application");
            //dynamic aCADutil = AutoCAD.Utility;
            AutoCAD.Visible = true;
            //dynamic mospace = AutoCAD.ModelSpace;
             dynamic doc = AutoCAD.ActiveDocument;
         
             doc.Open("D:\\2Dsample1.dwg");

错误:
System.Runtime.InteropServices.COMException (0x80210070): 發生例外狀況於 HRESULT: 0x80210070 ---> MS.Internal.ComAutomation.ComAutomationObjectExcep​tion: 發生例外狀況於 HRESULT: 0x80210070
(Source=AutoCAD)
(HelpFile=C:\Program Files (x86)\AutoCAD 2008\HELP\OLE_ERR.CHM#2149646448)
   於 MS.Internal.ComAutomation.ComAutomationNative.Chec​kInvokeHResult(UInt32 hr, String memberName, String exceptionSource, String exceptionDescription, String exceptionHelpFile, UInt32 exceptionHelpContext)
   於 MS.Internal.ComAutomation.ComAutomationNative.Invo​ke(Boolean tryInvoke, String memberName, ComAutomationInvokeType invokeType, ComAutomationInteropValue[] rgParams, IntPtr nativePeer, ComAutomationInteropValue& returnValue)
   於 MS.Internal.ComAutomation.ComAutomationObject.Invo​keImpl(Boolean tryInvoke, String name, ComAutomationInvokeType invokeType, Object& returnValue, Object[] args)
   於 MS.Internal.ComAutomation.ComAutomationObject.Invo​ke(String name, ComAutomationInvokeType invokeType, Object[] args)
   於 System.Runtime.InteropServices.Automation.Automati​onMetaObjectProvider.TryInvokeMember(InvokeMemberB​inder binder, Object[] args, Object& result)
   於 System.Runtime.InteropServices.Automation.Automati​onMetaObjectProviderBase.b__4(Object obj, InvokeMemberBinder binder, Object[] args)
   於 CallSite.Target(Closure , CallSite , Object , String )
   於 System.Dynamic.UpdateDelegates.UpdateAndExecuteVoi​d2[T0,T1](CallSite site, T0 arg0, T1 arg1)
   於 SilverlightOOBDemo.OutofBrowserMainPage.wordBtn_Cl​ick(Object sender, RoutedEventArgs e)
   於 System.Windows.Controls.Primitives.ButtonBase.OnCl​ick()
   於 System.Windows.Controls.Button.OnClick()
   於 System.Windows.Controls.Primitives.ButtonBase.OnMo​useLeftButtonUp(MouseButtonEventArgs e)
   於 System.Windows.Controls.Control.OnMouseLeftButtonU​p(Control ctrl, EventArgs e)
   於 MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName, UInt32 flags)}
回复

使用道具 举报

4

主题

20

帖子

1

银币

初来乍到

Rank: 1

铜币
36
发表于 2012-5-14 22:34:00 | 显示全部楼层
试试这个
Dim acadapp As AcadApplication
AcadApp = CreateObject("AutoCAD.Application")
AcadApp.Visible = True '界面可视
话说你是用.com方式启动CAD的吧
回复

使用道具 举报

0

主题

4

帖子

3

银币

初来乍到

Rank: 1

铜币
4
发表于 2012-5-14 23:50:00 | 显示全部楼层
剔除恐龙美化校园!
回复

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

QQ|关于我们|小黑屋|乐筑天下 繁体中文

GMT+8, 2025-6-29 19:16 , Processed in 1.021838 second(s), 69 queries .

© 2020-2025 乐筑天下

联系客服 关注微信 帮助中心 下载APP 返回顶部 返回列表