Opening a drawing/database from memory, instead of a file

Opening a drawing/database from memory, instead of a file

Anonymous
Not applicable
821 Views
2 Replies
Message 1 of 3

Opening a drawing/database from memory, instead of a file

Anonymous
Not applicable

Hello,

 

I am working on a plugin that would enable AutoCAD to open my encrypted drawings. I would like to avoid having to decrypt the drawing to a dwg file. However, the APIs for opening a drawing in AutoCAD all seem to work only with filepaths. Is there any other way to load a drawing/database in AutoCAD, that does not involve having a dwg file on the hard drive?

 

What has caught my attention was the

AcDbDatabase::readDwgFile(AcDwgFileHandle * pDwgFile, ...)

function, but I was unable to find any information on the AcDwgFileHandle class. If it just was a wrapper for Win32 HANDLE or something, it would easily solve my problems. Does anyone know how to obtain the AcDwgFileHandle and whether it would be useful for my purposes?

 

Thanks for your help.

 

Have a nice day,

Adam

822 Views
2 Replies
Replies (2)
Message 2 of 3

artc2
Autodesk
Autodesk
AcDwgFileHandle is in internal only class, so the class declaration is not available for public use. It only works with files on disk, so it would not be useful to you.
Message 3 of 3

tbrammer
Advisor
Advisor

Would it help at all if you would be able to decrypt a DWG "transparently"?

What if the user enters QSAVE? Would your drawing be encrypted automatically as well?

How do you manage the encryption?


Thomas Brammer ● Software Developer ● imos AGLinkedIn
If an answer solves your problem please [ACCEPT SOLUTION]. Otherwise explain why not.

0 Likes