.NET
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Silverligh t OOB CAD error
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
dynamic AutoCAD = AutomationFactory.CreateObject("AutoCAD.Applicatio
//dynamic aCADutil = AutoCAD.Utility;
AutoCAD.Visible = true;
//dynamic mospace = AutoCAD.ModelSpace;
dynamic doc = AutoCAD.ActiveDocument;
doc.Open("D:\\2Dsample1.dwg");
error
ystem.Runtime.InteropServices.COMException (0x80210070): 發生例外狀況於 HRESULT: 0x80210070 ---> MS.Internal.ComAutomation.ComAutomationObjectExcep
(Source=AutoCAD)
(HelpFile=C:\Program Files (x86)\AutoCAD 2008\HELP\OLE_ERR.CHM#2149646448)
於 MS.Internal.ComAutomation.ComAutomationNative.Chec
於 MS.Internal.ComAutomation.ComAutomationNative.Invo
於 MS.Internal.ComAutomation.ComAutomationObject.Invo
於 MS.Internal.ComAutomation.ComAutomationObject.Invo
於 System.Runtime.InteropServices.Automation.Automati
於 System.Runtime.InteropServices.Automation.Automati
於 CallSite.Target(Closure , CallSite , Object , String )
於 System.Dynamic.UpdateDelegates.UpdateAndExecuteVoi
於 SilverlightOOBDemo.OutofBrowserMainPage.wordBtn_Cl
於 System.Windows.Controls.Primitives.ButtonBase.OnCl
於 System.Windows.Controls.Button.OnClick()
於 System.Windows.Controls.Primitives.ButtonBase.OnMo
於 System.Windows.Controls.Control.OnMouseLeftButtonU
於 MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName, UInt32 flags)}
Re: Silverligh t OOB CAD error
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
You did not say, but I assume it is the last line of code you showed that causes the error:
doc.Open(....).
That is, you try to open a drawing document in SDI mode.
By default, AutoCAD is in MDI mode (it is very rare by now that someone still use AutoCAD in SDI mode). In MDI mode, AcadDocument.Open() cannot be called.
You should:
autoCAD.Visible=true;
dynamic doc=autoCAD.Documents.Open([path/name]);
//Then dosomething with doc object.
