OpenCAD – My First Book

I have been making noise about the Open Design Alliance on this blog for some time now. Most of the noise has been about the misconceptions surrounding the ODA and its technologies. And now to justify the noise that I have been making, I have gone ahead and written a book about it. The 92 page book is titled “OpenCAD – A Step by Step Guide to Developing a Professional CAD Application“. I think the best way to explain what the book is all about is to simply list its Introduction here.

Introduction

Ever since the Open Design Alliance (formerly the OpenDWG Alliance) was founded, it has been busy reverse engineering the DWG file format as and when Autodesk changed it. Due to this the ODA came to be known as the “hackers group” who give nothing but pain to Autodesk by offering their members libraries to read and write DWG files. Autodesk already has a library called RealDWG which reads and writes DWG files, but they are known not to license it to their business rivals. Hence the need for an organization such the ODA grew and the ODA delivered every time Autodesk changed the DWG file format.

My company, SYCODE (www.sycode.com), is a member of the Autodesk Developer Network (ADN) as well as a member of the ODA. I have been keeping a close eye on the cat and mouse game between Autodesk and ODA for quite some time now. In all the confusion, law suits and out-of-court settlements, there is one important aspect of the ODA that has gone completely unnoticed. And the purpose and motivation for me to write this book is to shed some light on that particular and very interesting aspect.

Every time the ODA reverse engineered the DWG file format, they improved their technology, not surprisingly, by cloning that of Autodesk. One thing led to another and they finally ended up cloning Autodesk’s ObjectARX SDK, the very foundation on which AutoCAD has been built. The ODA called their clone DWGdirect and needless to say, ODA members started using DWGdirect to read and write DWG files. And that is the problem which I hope to address by means of this book. DWGdirect is not just a SDK to read and write DWG files. It actually offers a full blown framework that can be used to develop a professional CAD application, complete with plug-in architecture and all. Applications built using the DWGdirect SDK are called DWGdirect hosted applications. The not yet released IntelliCAD 7 is one of them. Bricsys rewrote Bricscad as a DWGdirect hosted application in V8 itself.

This book is my attempt to show that the ODA offers far more than libraries to read and write DWG files. We will create the framework of a professional CAD application (which I have called OpenCAD) using nothing but Visual C++ 2005 and a bunch of ODA libraries. You will also learn how to create plug-ins that extend OpenCAD using the ODA’s free DRX SDK. And of course, OpenCAD will be able to read and write DWG files as well.

This book is divided into two sections. Section I deals with creating the basic OpenCAD application, wiring it up with required ODA libraries and adding features to make it a full blown professional DWG viewer. Section II deals with adding plug-in architecture to OpenCAD and developing a plug-in that converts it into a DWG editor. We will also see how the plug-in developed for OpenCAD loads and runs in Bricscad V9 as well.

If you are an ODA member then you already have access to the DWGdirect SDK and you can start building OpenCAD or your own DWGdirect hosted application by following the instructions in Section I of this book. If you are not an ODA member you can download the OpenCAD source code and binaries from www.open-cad.com and start developing plug-ins for it or any other DWGdirect hosted application by following the instructions in Section II of this book.

The point of the OpenCAD software and this book is not to develop a full blown free CAD application. Rather my intention is to showcase the various technologies offered by the ODA, apart from reading and writing DWG files. We will first create OpenCAD as a DWG viewer and then add features as we proceed.

OpenCAD is not open source for the simple reason that the DWGdirect SDK is not open source. However, all the C++ source code used to build OpenCAD and its plug-ins are available free of cost at www.open-cad.com. I have also organized the source code by chapter. So if you want to skip a chapter or two you can do so.

I have used Microsoft Visual C++ 2005 and DWGdirect version 2.06 to develop OpenCAD and its plug-in. The ODA offers libraries for other compilers as well and you can very well use another compiler.

I write software for a living, not books. So I am not quite sure how this book is going to turn out. I am going to need all the criticism that I can get – good, bad and ugly. Please do give it to me.

If this book ends up helping you in any way or gives you a better understanding of the technologies offered by the ODA, do let me know. It will make me happy šŸ˜‰

So let’s get right to it.

The book is available as a perfectly bound paperback book ($99) as well as a PDF eBook ($49). It comes with complete C++ source code which you can use to make a professional CAD application that makes you a whole lot more money than you spent on purchasing the book. The book also serves as a good primer on developing DRX plug-ins that work with DWGdirect hosted applications like Bricscad V9, which will also help you earn money. So you see, its all about spending some money to make a whole lot more money šŸ˜‰

For more details on this book visit www.open-cad.com.

And now, thanks to this book, you can henceforth respectfully refer to me as Author.

 

Front Cover

 

 

Back Cover
  • Anonymous

    I think the real use of a 2D CAD framework (and thus your book on ODA SDK) is for vertical applications (such as electrical schematic and control cabinet design), not to make yet another AutoCAD clone.

    –Tony

  • Anonymous

    I think the real use of a 2D CAD framework (and thus your book on ODA SDK) is for vertical applications (such as electrical schematic and control cabinet design), not to make yet another AutoCAD clone.–Tony

  • Deelip Menezes

    I agree. If someone wants to create another AutoCAD clone, they might as well join the InteliCAD Technology Consortium. The ITC has used the same approach in writing the new IntelliCAD as I did in writing OpenCAD. IntelliCAD and OpenCAD share the same genetics – the DWGdirect SDK.

    The point of this book is to highlight the technologies offered by the ODA as well as assist in the creation of DWGdirect hosted applications. At SYCODE, we are rewriting our standalone products as DWGdirect hosted applications so that we can add DRX plug-in architecture to them, among other things. None of our products will be AutoCAD clones.

  • Deelip Menezes

    I agree. If someone wants to create another AutoCAD clone, they might as well join the InteliCAD Technology Consortium. The ITC has used the same approach in writing the new IntelliCAD as I did in writing OpenCAD. IntelliCAD and OpenCAD share the same genetics – the DWGdirect SDK.The point of this book is to highlight the technologies offered by the ODA as well as assist in the creation of DWGdirect hosted applications. At SYCODE, we are rewriting our standalone products as DWGdirect hosted applications so that we can add DRX plug-in architecture to them, among other things. None of our products will be AutoCAD clones.

  • PeterCharles

    Do I have to join the Open Design Alliance to get the ODA libraries you use? Even ODA Associate Membership will cost me $250 šŸ™

  • PeterCharles

    Do I have to join the Open Design Alliance to get the ODA libraries you use? Even ODA Associate Membership will cost me $250 šŸ™

  • Deelip Menezes

    Yes. The DWGdirect SDK is available to members only. I can assure you, membership is well worth it.

    However, the DRX SDK used to build plug-ins for DWGdirect hosted applications is available free of charge to everyone.

  • Deelip Menezes

    Yes. The DWGdirect SDK is available to members only. I can assure you, membership is well worth it.However, the DRX SDK used to build plug-ins for DWGdirect hosted applications is available free of charge to everyone.

  • quantumdesigner

    Thanks for providing valuable information about CAD systems on your blog. I’m beginning to think that I should start up a blog in another discipline. I’ve been looking at purchasing a CAD system for personal use. I do alot of visualization and I tend to run numbers in EXCEL or Quattro Pro depending on the application. However, I’m now running into 3D imagery problems that can only be solved with autocad or something similar.

    I’d like to purchase a decent autocad program without paying $3000.00 Canadian for it. I’m looking at ITC right now but I haven’t used it yet. What do you recommend?

  • quantumdesigner

    Thanks for providing valuable information about CAD systems on your blog. I’m beginning to think that I should start up a blog in another discipline. I’ve been looking at purchasing a CAD system for personal use. I do alot of visualization and I tend to run numbers in EXCEL or Quattro Pro depending on the application. However, I’m now running into 3D imagery problems that can only be solved with autocad or something similar.I’d like to purchase a decent autocad program without paying $3000.00 Canadian for it. I’m looking at ITC right now but I haven’t used it yet. What do you recommend?

  • Deelip Menezes

    With an exception of Bricscad, I think all the other IntelliCAD, run the same old IntelliCAD 6 code. Although, I know that some ITC members have meddled with the original ITC code. I suggest you keep some time aside to test a few IntelliCAD’s with your data and then decide for yourself.

  • Deelip Menezes

    With an exception of Bricscad, I think all the other IntelliCAD, run the same old IntelliCAD 6 code. Although, I know that some ITC members have meddled with the original ITC code. I suggest you keep some time aside to test a few IntelliCAD’s with your data and then decide for yourself.

  • Omar

    Let's say some designer buys your book and follows up all the process and eventually ends up with a shinning new OpenCad. Can he use it for his professional design activity? Now, how can he become authorized to sell or give away the software to others?

  • Sure. But it depends upon the level of membership that you have with the ODA. Commercial members can sell only 100 copies a year. For Sustaining and Founding members, there is no such limit. However Associate members cannot sell products built using the ODA libraries until they upgrade to a high level.

  • Iustin

    error C2259: ‘COpenCADDoc’ : cannot instantiate abstract class
    1> due to following members: OdUInt32 OdEdBaseIO::getKeyState(void)’ : is abstract ExEdBaseIO.h(101) : see declaration of ‘OdEdBaseIO::getKeyState’virtual Ā OdUInt32 getKeyState() = 0;Ā OdUInt32 getKeyState() = 0;ExEdBaseIO.h(101) : see declaration of ‘OdEdBaseIO::getKeyState’virtual Ā OdUInt32 getKeyState() = 0;Ā OdUInt32 getKeyState() = 0;
    OdUInt32 OdEdBaseIO::getKeyState(void)’ : is abstract ExEdBaseIO.h(101) : see declaration of ‘OdEdBaseIO::getKeyState’virtual Ā OdUInt32 getKeyState() = 0;Ā OdUInt32 getKeyState() = 0;
    ExEdBaseIO.h(101) : see declaration of ‘OdEdBaseIO::getKeyState’
    virtual Ā OdUInt32 getKeyState() = 0;Ā OdUInt32 getKeyState() = 0;How can i solve this ?