PDA

View Full Version : how to display DGN file



Nithya
18th April 2008, 14:03
I need to display a DGN file .Any plugin is available?
otherwise how do I proceed?

stevey
18th April 2008, 16:52
I highly doubt it exists for Qt.

I'm assuming your talking about V8 DGN Cad format?
Read this http://www.bentley.com/en-US/Products/MicroStation/OpenDGN/ , specifically look at the section with the bold heading "V8 DGN Specification" near the bottom of the page.

On the surface it appears you could write your own reader. Read the doco on writing ImageFormat plugins. I wrote one for TIF and I'm nearly done on a .TGA one. It's fairly straight forward to get the plugin happening, but there'll be lots of work implementing the specification. Hunt around for an open source project that implements it, then link the QtDGN ImageFormat plugin to that.

Nithya
21st April 2008, 15:30
Any specific functionalities that any one know that is being implemented to see a DGN file?.
using dgnlib it will give the elementary information.How to display it?

Any body Knows to integrate Qt with dgnlib?

stevey
21st April 2008, 22:55
If you have a .o / .lib file or even the source code for libdgn, then you need to creatre a Qt Image Format plugin. I'll tell you what I'll do, I have a CodeSmithTools template here which I wrote to assist with the creation of an Image Format Skeleton. I'll build you a skeleton for DGN and post it on the forum tonight (it's now 7am where I am).
I'll put in code comments suggesting where you should put code to link to an existing libdgn proejct.

Sound good??

stevey
22nd April 2008, 03:45
By the way, do you want to be able to edit the DGN rendered image, or just view?

Nithya
22nd April 2008, 06:32
Ya It really sounds good and Thank you if you could.
I just need to display the dgn file as background of my application.

stevey
22nd April 2008, 06:46
No worries, I'll see what I can do.
I found the dgnlib source code, I'll go the whole hog and attempt to build a complete plugin.
I'll schtick the skeleton template up here tonight as well just in case someone else wants to have a go and gets it done before me :rolleyes:

Nithya
23rd April 2008, 12:57
Is there any way to render the elementary information what dgnlib is giving to be directly displayed?

stevey
24th April 2008, 11:23
Well, clearly any ca package that uses it does do that step.
Wether it's in the dgnlib api or not will determine if we need to write the code to render to a pixmap is yet to be told. I haven't had a good look at it yet.