DWG conversion

PriyaR

Newcomer
Hi,

Am working in C#.In my project,i need to convert DWG file(CAD file format) into .X(DirectX file format).Is there any way of converting in my code?Am surfing in this topic for the past 10 days..Any help is appreciated.

Regards,
Priya
 
The .X format is pretty straight-forward and the D3DX functions allow you to manipulate the data and then save it back to disk (or just keep it as memory-resident for rendering).

There are some plugins and conversion tools out there for 3D modelling formats, but generally speaking .X doesn't receive much love in this arena so you may well be on your own.

hth
Jack
 
DWG is binary and mostly compress, you may not be able to deciple it....

I think you need to describe more detail on the .dwg drawing you asked. Is it a 3-D modelling or just a plain 2-D drafting? Normally, when doing porting any CAD file to other format, you may need to 'Export' it into a standard format that contain only neccessary information of the model in Text format, i.e. iges, step or dwx (I don't sure about dwx since it was long ago when I involved with this kind of work). And when you get that standard file format you can port it to any kinds of format only if you understant how to construct those information into the new format.

Hope this may help...
 
Hai all,

Thanks for ur replies...

Im using 3d dwg file to be exported into directx.

In the link http://75.125.130.82/support/index.php?title=Exporting, there is plugins to be installed for some softwares(3dmax, maya). But im not using any softwares for my purpose. i need to convert the dwg file into directx file with only C# program and not using software.

So can anyone give some suggestions to do this?

Regards,
Priya.R
 
From that page, I see this which is an exporter from AutoCad 2002 to .X.
Or you could try this which is another autocad to .x exporter.

As for creating your own converter, the source for dwg isn't public/published, so you'd need to find the source for an importer and use that as a basis for your converter. Or you could possibly join AutoDesks Developers Network and buy a license for the dwg source. But most CAD formats are very expensive to license...
 
The DWG-format is very complex and a closed format. There are however two SDKs that can read (and write) DWG-files. Neither is free of charge...

Open Design Alliance has two SDKs, one C++ and one .NET. I've used the .NET version which basically follows the API-specifications as the AutoDesk-version. Worked good for my project but there were some limitations.
They are not affiliated with AutoDesk so they reversed engineered the specifications which they also put on the first page of their site.
http://www.opendwg.org/

AutoDesks SDK (I think it's called RealDWG) I've never used it, because Open Design Alliance used to be much cheaper.
 
Back
Top