aykut66 Posted May 7, 2014 Share Posted May 7, 2014 hello dear friends, i am working on a project of transforming the drawing. I want to read the AutoCAD file in to VB program so that i can generate an equivalent drawing with the same co-ordinates. For this i need to know the file format of AutoCAD drawing file which contains the co-ordinates of the lines,circles.etc( shapes). I want to learn initial and end positions of this shapes. "How i can read the file of AutocAD with extension( .DWG ) into my VB program to get the exact values of the drawing objectsn( lines etc ) Please help me in this regard with your valuable knowledge and experience. Best Regards, Aykut Kocaeli University Quote Link to comment Share on other sites More sharing options...
ReMark Posted May 7, 2014 Share Posted May 7, 2014 Wouldn't that require a DXF file? Quote Link to comment Share on other sites More sharing options...
dbroada Posted May 7, 2014 Share Posted May 7, 2014 I doubt that you will be able to decode a dwg file as it is basically a compressed database file, and I can't see AutoDesk releasing their compression algorithms easily. You will get a lot further if you start with a DXF file though as that is a text file which can be interpreted with a bit of time spent reading it. Quote Link to comment Share on other sites More sharing options...
RICVBA Posted May 7, 2014 Share Posted May 7, 2014 @aykut66 I read somewhere that with "ObjectDBX" you can get information from and even edit drawing without opening it. here's a code snippet I put aside for when one day I'll get to struggle with this argument dim sampleFilePath as string dim dbx as axdbdocument dim doc as acaddocument dim partListRefIndex as integer sampleFilePath = "somewhere/sample.dwg" set dbx = new axdbdocument set doc = thisDrawing ' Let's point both version to the same file doc.open(sampleFilePath, READ_ONLY) dbx.open(sampleFilePath) I guess this could mean you don't even have to have Autocad installed! hope this could help for a start in that case, I'd gladly share your results bye Quote Link to comment Share on other sites More sharing options...
BlackBox Posted May 7, 2014 Share Posted May 7, 2014 I'm confused... Reading this thread's title, and OP's posts I'm interpreting that you're after .NET code, but the code sample you posted looks like VBA... Which is you're after? Visual Basic == VB.NET, Visual Basic for Applications == VBA Quote Link to comment Share on other sites More sharing options...
aykut66 Posted May 7, 2014 Author Share Posted May 7, 2014 I opened dwg format ın notepad and I realized that it is in binary code . but dxf formatted files are in good from that I need. ı thınk ıt wıll help me more. if you have some source code can you share wıth me? I want to start wıth it. thanks for all. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.