Lightweight DWG Parsing

Lightweight DWG Parsing

Kyudos
Advisor Advisor
933 Views
2 Replies
Message 1 of 3

Lightweight DWG Parsing

Kyudos
Advisor
Advisor

We provide numerous DWG files with our product that define blocks. By default, these are all layer 0  / BYBLOCK, with the actual colour used when displaying being defined in a database (amongst other things).

 

However, for if a block has no BYBLOCK elements, the colour in the database is irrelevant - the block will show with the predefined colours (leaving aside BYLAYER for now). So, in our database editor (a standalone program), it would be useful to disable the colour selection in this case. Outside of some invented info encoding in (say) the filename, the only way to know whether to do this would be to parse the block-definition DWG to look for BYBLOCK elements.

 

Does anyone have any experience using the RealDWG SDK? Would it add a lot of 'bloat' to my DB editor to make it capable of reading the DWG files?

0 Likes
934 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable

We use RealDWG, from the .NET side, this have work for us, we use or read tons of templates, among many other uses, and RealDWG works nice. You are not going to have an editor, no selections, etc., you should it give it a try.

 

Good luck! 

0 Likes
Message 3 of 3

tbrammer
Advisor
Advisor

I'm not sure what you mean by "bloat". To run a RealDWG application it is definitely required so install quite a lot of RealDWG stuff. In my case (RealDWG 2020) this is a directory %PROGRAMFILES%\Autodesk\RealDWG 2020 that contains 250MB of DLLs and DBXes and another 600MB of other stuff. This is similiar to the %PROGRAMFILES%\Autodesk\AutoCAD 2020 directory.

 

I'm developing a C++ application. The app itself may be very small. But it will definitely use some larger Autodesk DLLs like acdb23.dll (22MB).

 

Some years ago I tried to build a "RealDWG DLL" with RealDWG 2013 that should be loaded dynamically from another app. I never got it to work. It seems that it is only possible to build a RealDWG EXE. Maybe this is possible with newer versions. I didn't try again.

 

If you have your RealDWG project running it works like a charm to create/read/edit/write DWGs. You can reuse your existing ObjectARX code 1:1 as long as you don't use any acedXXX() functions, AcGs or AcUi API. Also your RealDWG app can load and run your custom DBX modules.


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