Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3315216
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T22:19:27+00:00 2026-05-17T22:19:27+00:00

I have a program that does batch processing on some drawings. One of the

  • 0

I have a program that does batch processing on some drawings. One of the drawings throws an exception “Error Decrypting Data” when I try to open it. This drawing in particular was generated by a third-party tool other than AutoCAD. In addition, this problem only occurs in AutoCAD 2011. In AutoCAD 2010 it prompts the user that the file was generated outside of AutoCAD but they can click and the batch will continue. I’ve tried opening it using both the managed .NET API and the COM Interop API but both give the same error.

Here is a post from the AutoCAD formus though it didn’t provide me with a solution:

http://forums.autodesk.com/t5/NET/Error-Decrypting-Data-Acad-2011/td-p/2661762/highlight/true

Managed API

string drawingFilePath = @"C:\Drawings\MyDrawing.dwg";
Application.DocumentManager.Open(drawingFilePath, false);

COM Interop

string drawingFilePath = @"C:\Drawings\MyDrawing.dwg";
Object comAutoCAD = Application.AcadApplication;
Object comDocuments = comAutoCAD.GetType().InvokeMember("Documents", BindingFlags.GetProperty, null, comAutoCAD, new object[] { });

Object comDocument = comDocuments.GetType().InvokeMember("Open", BindingFlags.InvokeMethod, null, comDocuments,
    new object[] { drawingFilePath, false, Type.Missing });
Document.FromAcadDocument(comDocument);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T22:19:28+00:00Added an answer on May 17, 2026 at 10:19 pm

    Someone from the AutoCAD forums posted an answer that works for me.

    http://forums.autodesk.com/t5/NET/Error-Decrypting-Data-Acad-2011/td-p/2661762/page/2

    Here is an example:

    const string systemVar_DwgCheck = "DWGCHECK";
    Int16 dwgCheckPrevious = (Int16)Application.GetSystemVariable(systemVar_DwgCheck);
    Application.SetSystemVariable(systemVar_DwgCheck, 2);
    
    Document document = Application.DocumentManager.Open(@"C:\Drawings\MyDrawing.dwg", false);
    // Do stuff...
    
    Application.SetSystemVariable(systemVar_DwgCheck, dwgCheckPrevious);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some code that effectively does this : File file = new File(C:\\Program
I have a program that spits out both standard error and standard out, and
Background I have a Spring batch program that reads a file (example file I
I have a program that does the following: Call webservice (there are many calls
I have a program that does different things my questions is related to access
I got a weird problem. I have a program that (does many things but
I have a program that roughly does this: open a file to read from
I have a program that ran in iOS 2.0 and now am making some
I have a script that appends some rows to a table. One of the
I have a program that creates a Windows user account using the NetUserAdd() API

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.