Error Decrypting Data (Acad 2011)

Error Decrypting Data (Acad 2011)

Anonymous
Not applicable
7,142 Views
24 Replies
Message 1 of 25

Error Decrypting Data (Acad 2011)

Anonymous
Not applicable
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
0 Likes
7,143 Views
24 Replies
Replies (24)
Message 21 of 25

Anonymous
Not applicable

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

0 Likes
Message 22 of 25

Anonymous
Not applicable

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

0 Likes
Message 23 of 25

hgasty1001
Advisor
Advisor

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

 

 

0 Likes
Message 24 of 25

hgasty1001
Advisor
Advisor

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

 

 

0 Likes
Message 25 of 25

API991
Explorer
Explorer

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

0 Likes