.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Error Decrypting Data (Acad 2011)

24 REPLIES 24
Reply
Message 1 of 25
hawesan
5207 Views, 24 Replies

Error Decrypting Data (Acad 2011)

I get the following error in vb .net macro :

System.Runtime.InteropServices.COMException was unhandled by user code
ErrorCode=-2145386153
HelpLink="C:\Program Files\Autodesk\ACADM 2011\HELP\OLE_ERR.CHM#-2145386153"
Message="Error Decrypting Data"
Source="AutoCAD"
StackTrace:
at Autodesk.AutoCAD.Interop.AcadDocumentsClass.Open(String Name, Object ReadOnly, Object Password) at dwgdb1.addDrawings(String& typestr) in C:\Users\harrison.pe\Documents\Visual Studio 2008\Projects\GEA_DrawingDB\dwgdb1.vb:line 346 at dwgdb1.CommandButton4_Click(Object eventSender, EventArgs eventArgs) in C:\Users\harrison.pe\Documents\Visual Studio 2008\Projects\GEA_DrawingDB\dwgdb1.vb:line 557 at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ButtonBase.WndProc(Message& m) at System.Windows.Forms.Button.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
InnerException:

Works fine in Acad 2010 ! see attached image from visual studio debug

System = Windows 7 (64bit) Autocad Mechanical 2011
24 REPLIES 24
Message 21 of 25
skeletank
in reply to: Aaron.Warnke

Works for me as well.  Thank you very much Gaston! Smiley Happy

Message 22 of 25
matus.brlit
in reply to: hawesan

or you can just catch the exception, i guess

 

you don't get errors from handled exceptions and you can also test if the problem is because of different application creating the drawing, or because of the potential errors

Message 23 of 25
hgasty1001
in reply to: matus.brlit

Hi,

 

Yes, you can trap the COMexception (not a simple Exception), but doing so ( did you?), you still have to set the variable DWGCHECK=2 and try to open the file again in order to get, may be, the drawing opened.

 

Gaston Nunez

 

 

Message 24 of 25
hgasty1001
in reply to: matus.brlit

Hi,

 

I think that a better aproach is to set DWGCHECK=2, then try to open the drawing as usual, get the drawing opened and check the DwgFileWasSavedByAutodeskSoftware property in order to take some action.

Gaston Nunez

 

 

Message 25 of 25
API991
in reply to: Anonymous

Great! This solved my problem also! Many thanks!!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost