.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
5210 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 2 of 25
Anonymous
in reply to: hawesan

Is the drawing encrypted or digitally signed?

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2011

http://www.acadxtabs.com

Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");

wrote in message news:6368203@discussion.autodesk.com...
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
Message 3 of 25
hawesan
in reply to: hawesan

Tony - Thanks for your reply.

The drawing doesnt appear to be digitaly signed, the digital signature dialog box doesnt open up and I have it set to display in the options, but the drawing has been created in microstation and I get the following message in the command line :

Non Autodesk DWG. This DWG file was saved by a software application that was
not developed or licensed by Autodesk. Autodesk cannot guarantee the
application compatibility or integrity of this file.
Message 4 of 25
Anonymous
in reply to: hawesan

Well, it could be that Mr. Bass has decided to do something
to AutoCAD 2011 that could become a problem for Autodesk.

Can you post the file or email it to me?

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2011

http://www.acadxtabs.com

Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");

wrote in message news:6368195@discussion.autodesk.com...
Tony - Thanks for your reply.

The drawing doesnt appear to be digitaly signed, the digital signature dialog
box doesnt open up and I have it set to display in the options, but the drawing
has been created in microstation and I get the following message in the command
line :

Non Autodesk DWG. This DWG file was saved by a software application that was
not developed or licensed by Autodesk. Autodesk cannot guarantee the
application compatibility or integrity of this file.
Message 5 of 25
hawesan
in reply to: hawesan

Hi Tony, here is the problem dwg file
Message 6 of 25
Anonymous
in reply to: hawesan

This could be an API change.

Can you post the code that opens the document?

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2011

http://www.acadxtabs.com

Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");

wrote in message news:6368978@discussion.autodesk.com...
Hi Tony, here is the problem dwg file
Message 7 of 25
hawesan
in reply to: hawesan

Hi Tony
Here is the code that opens the drawing attached
Message 8 of 25
Anonymous
in reply to: hawesan

Try changing the call to open to this:

acadApp.Documents.Open( filename, True, Type.Missing )

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2011

http://www.acadxtabs.com

Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");

wrote in message news:6369089@discussion.autodesk.com...
Hi Tony
Here is the code that opens the drawing attached
Message 9 of 25
hawesan
in reply to: hawesan

Hi Tony

I still get exactly the same error.
Message 10 of 25
Anonymous
in reply to: hawesan

Do you get the same error with other files, or just
this one?

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2011

http://www.acadxtabs.com

Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");

wrote in message news:6369133@discussion.autodesk.com...
Hi Tony

I still get exactly the same error.
Message 11 of 25
Anonymous
in reply to: hawesan

Do you run the code from an external application (exe) or inside AutoCAD
("netload" it into AutoCAD)?

"harrisonpm" wrote in message news:6369089@discussion.autodesk.com...
Hi Tony
Here is the code that opens the drawing attached
Message 12 of 25
hawesan
in reply to: hawesan

Hi Norman

The code is run from within autocad (acad 2011).

Thanks Peter
Message 13 of 25
hawesan
in reply to: hawesan

Hi Tony

This is another drawing (saved as a dwg from microstation) gives the same problem

Peter
Message 14 of 25
hawesan
in reply to: hawesan

Tony

I have actually fixed this problem, it seems to have been a lisp file that I had in my startup suite contents that caused the error, still not really sure why but my .net macro now works on all drawings it open up. Thanks for your help in trying to solve this problem.

Peter
Message 15 of 25
skeletank
in reply to: hawesan

I am running into this same problem.  I tried the COM Interop example that Tony Tanzillo gave but it still throws that error when I try to open it.  My file was generated by a third-party tool as well.

Message 16 of 25
Aaron.Warnke
in reply to: skeletank

I'm having the same problem too.  Seem to only happen with dwg files created from something other than autodesk products.  Drawings open fine directly through AutoCAD (2011), but noth with vba.  Also works fine with 2010. 

Message 17 of 25
skeletank
in reply to: Aaron.Warnke

I ended up using a workaround for the problem.  The operation that I needed to do did NOT require opening the drawing so I just opened it using Database.ReadDwgFile.  It didn't throw any exceptions by doing it this way.

Message 18 of 25
Aaron.Warnke
in reply to: skeletank

Thanks for the quick reply,  but I need to open the drawing. I wonder why it is different between 2010 and 2011?

 

Message 19 of 25
hgasty1001
in reply to: hawesan

This problem is related to the DWGCHECK system variable, set it to 2 , the default is 1, this problem also apears in VBA but with a different error message, something like "Filer error" , but the "solution" is the same set DWGCHECK=2.

 

Regards,

 

Gaston Nunez

Message 20 of 25
Aaron.Warnke
in reply to: hgasty1001

It works!

 

Thanks alot Gaston!

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