Thread Subject:
importing AutoCAD DXF or DWG

Subject: importing AutoCAD DXF or DWG

From: Dig-IT

Date: 12 Oct, 2004 21:13:30

Message: 1 of 15

Hi all,

Does anyone know how to import (plot) AutoCad DXF or DWG files in Matlab?

At the moment I'm using a workaround: converting the DXF using the
external program dxf2xyz 2.0 to an ASCII file with x,y,z values
(manually, that is).

The quality of the plots this produces is not too great (there are some
conversion errors). Also, since I'd like to be able to import DXF files
from a GUI, the external workaround is not good enough.

Does anybody know of a way to import DXF of DWG into Matlab?

Thank you,

Jos

Subject: importing AutoCAD DXF or DWG

From: Carlos Lopez

Date: 14 Oct, 2004 11:49:42

Message: 2 of 15

Dig-IT wrote:
>
>
> Hi all,
>
> Does anyone know how to import (plot) AutoCad DXF or DWG files in
> Matlab?
>
> At the moment I'm using a workaround: converting the DXF using the
> external program dxf2xyz 2.0 to an ASCII file with x,y,z values
> (manually, that is).
>
> The quality of the plots this produces is not too great (there are
> some
> conversion errors). Also, since I'd like to be able to import DXF
> files
> from a GUI, the external workaround is not good enough.
>
> Does anybody know of a way to import DXF of DWG into Matlab?
>
> Thank you,
>
> Jos
Let me know where to send you some (partial) solution.

Subject: importing AutoCAD DXF or DWG

From: Miltiades Salvanos

Date: 15 Oct, 2004 10:33:22

Message: 3 of 15

>>
>> Thank you,
>>
>> Jos
> Let me know where to send you some (partial) solution.

Have you actually managed to parse the AutoCad DWG or DFX format and
import it into Matlab?
Well, that's most impressive! I would be very interested in it also..
do you parse lines,curves etc. or just points?
it you actually import all entities then many many kudos to you!!
why don't you just post a snippet here or put it in file exchange so
we can all enjoy?
thanks
Miltiades

Subject: importing AutoCAD DXF or DWG

From: Dig-IT

Date: 18 Oct, 2004 23:26:48

Message: 4 of 15

Just use this e-mail address (without everything between %%) or the
e-mail address I directly e-mailed you from.

Thank you!

Jos

Carlos Lopez wrote:
> Dig-IT wrote:
>
>>
>>Hi all,
>>
>>Does anyone know how to import (plot) AutoCad DXF or DWG files in
>>Matlab?
>>
>>At the moment I'm using a workaround: converting the DXF using the
>>external program dxf2xyz 2.0 to an ASCII file with x,y,z values
>>(manually, that is).
>>
>>The quality of the plots this produces is not too great (there are
>>some
>>conversion errors). Also, since I'd like to be able to import DXF
>>files
>>from a GUI, the external workaround is not good enough.
>>
>>Does anybody know of a way to import DXF of DWG into Matlab?
>>
>>Thank you,
>>
>>Jos
>
> Let me know where to send you some (partial) solution.

Subject: importing AutoCAD DXF or DWG

From: J Luis

Date: 18 Oct, 2004 19:43:58

Message: 5 of 15

Dig-IT wrote:
>
>
> Just use this e-mail address (without everything between %%) or the
>
> e-mail address I directly e-mailed you from.
>
> Thank you!
>
> Jos
>
Hi Jos,
I tried to send you an email asking for a copy of your dxf reading
functions but it was refused saying "Domain not found".
Can I have a copy of it as well?

Thanks
J. Luis

Subject: importing AutoCAD DXF or DWG

From: SeBy

Date: 19 Oct, 2004 02:15:57

Message: 6 of 15

J Luis wrote:
>
>
> Dig-IT wrote:
>>
>>
>> Just use this e-mail address (without everything between %%) or
> the
>>
>> e-mail address I directly e-mailed you from.
>>
>> Thank you!
>>
>> Jos
>>
> Hi Jos,
> I tried to send you an email asking for a copy of your dxf reading
> functions but it was refused saying "Domain not found".
> Can I have a copy of it as well?
>
> Thanks
> J. Luis

It would ba fantastic if this code could be send to Matlab Central.

Sébastien

Subject: importing AutoCAD DXF or DWG

From: Cecilia

Date: 27 Oct, 2004 00:34:35

Message: 7 of 15

Hello....
Can anybody send me a copy of this code?
I need to do this and also manipulate the file from matlab, and im
learning matlab at the moment...

Subject: importing AutoCAD DXF or DWG

From: Manoj Ranjan

Date: 20 Dec, 2004 10:13:48

Message: 8 of 15

Dear Miltiades Salvanos,

Please do also help me read the Dxf format.

Regards
Manoj

Miltiades Salvanos wrote:
>
>
>>>
>>> Thank you,
>>>
>>> Jos
>> Let me know where to send you some (partial) solution.
>
> Have you actually managed to parse the AutoCad DWG or DFX format
> and
> import it into Matlab?
> Well, that's most impressive! I would be very interested in it
> also..
> do you parse lines,curves etc. or just points?
> it you actually import all entities then many many kudos to you!!
> why don't you just post a snippet here or put it in file exchange
> so
> we can all enjoy?
> thanks
> Miltiades

Subject: importing AutoCAD DXF or DWG

From: Carlos Lopez

Date: 21 Dec, 2004 17:02:01

Message: 9 of 15

I have not sent the code to matlab central because it is not good
enough according to my standards. It deals only with isolated points,
LINE, POLYLINE and ARC (using the DXF notation). We did not attempt
to parse ELLIPSE, SPLINE, etc. but I guess it could be done. If you
read in the web about DXF you will soon find that many people blame
AutoDESK for the poor design and implementation of DXF. So, making
reliable code to read it into matlab is pervaded by the same virus:
you might read without problems DXF for ACAD R12, but not DXF for
ACAD R14 neither ACAD 2000.
I will be happy to share the present code with anyone which wants to
have it.
It will be a good idea to consider the new DWF format; unlike DWG and
DXF, AutoDESK provides source code in C to read and write it, so
(hopefully) anyone more or less proficient with C could serve the
matlab community creating a mex file once for all.
Regards
Carlos
PD: Hope that my e-mail will not be too difficult to decipher!
>> Have you actually managed to parse the AutoCad DWG or DFX
format
>> and
>> import it into Matlab?
>> Well, that's most impressive! I would be very interested in it
>> also..
>> do you parse lines,curves etc. or just points?
>> it you actually import all entities then many many kudos to
you!!
>> why don't you just post a snippet here or put it in file
exchange
>> so
>> we can all enjoy?
>> thanks
>> Miltiades

Subject: importing AutoCAD DXF or DWG

From: Estebal

Date: 10 Jan, 2005 11:16:03

Message: 10 of 15

Hi,
I'm also very interested in having a look at this code. I understand
your concern ACAD and also the new opportunity we may have with DWF
source codes.
Anyway, thanks in advance

Estebal

Carlos Lopez wrote:
>
>
> I have not sent the code to matlab central because it is not good
> enough according to my standards. It deals only with isolated
> points,
> LINE, POLYLINE and ARC (using the DXF notation). We did not attempt
> to parse ELLIPSE, SPLINE, etc. but I guess it could be done. If you
> read in the web about DXF you will soon find that many people blame
> AutoDESK for the poor design and implementation of DXF. So, making
> reliable code to read it into matlab is pervaded by the same virus:
> you might read without problems DXF for ACAD R12, but not DXF for
> ACAD R14 neither ACAD 2000.
> I will be happy to share the present code with anyone which wants
> to
> have it.
> It will be a good idea to consider the new DWF format; unlike DWG
> and
> DXF, AutoDESK provides source code in C to read and write it, so
> (hopefully) anyone more or less proficient with C could serve the
> matlab community creating a mex file once for all.
> Regards
> Carlos
> PD: Hope that my e-mail will not be too difficult to decipher!
>>> Have you actually managed to parse the AutoCad DWG or DFX
> format
>>> and
>>> import it into Matlab?
>>> Well, that's most impressive! I would be very interested in
> it
>>> also..
>>> do you parse lines,curves etc. or just points?
>>> it you actually import all entities then many many kudos to
> you!!
>>> why don't you just post a snippet here or put it in file
> exchange
>>> so
>>> we can all enjoy?
>>> thanks
>>> Miltiades

Subject: importing AutoCAD DXF or DWG

From: Nash Dima

Date: 30 Jun, 2011 16:03:08

Message: 11 of 15

Hi all,
Is there a way to import a 2d drawing to matlab then? I ve seen quite some discussion but not sure what I need to do. Any advice is welcome
Thanks

Subject: importing AutoCAD DXF or DWG

From: Camilo Diaz

Date: 5 Apr, 2012 14:52:12

Message: 12 of 15

Hi Carlos!!! I'm also interested in the code that imports DXF files into MATLAB!!!it would be great if you could send it to me!!

Thx

Camilo Diaz


-------------------------------------------------------------------------------------------------------
"Carlos Lopez" <clv2clv@removeThisadinet.com.uy> wrote in message <eeecc71.7@webx.raydaftYaTP>...
> I have not sent the code to matlab central because it is not good
> enough according to my standards. It deals only with isolated points,
> LINE, POLYLINE and ARC (using the DXF notation). We did not attempt
> to parse ELLIPSE, SPLINE, etc. but I guess it could be done. If you
> read in the web about DXF you will soon find that many people blame
> AutoDESK for the poor design and implementation of DXF. So, making
> reliable code to read it into matlab is pervaded by the same virus:
> you might read without problems DXF for ACAD R12, but not DXF for
> ACAD R14 neither ACAD 2000.
> I will be happy to share the present code with anyone which wants to
> have it.
> It will be a good idea to consider the new DWF format; unlike DWG and
> DXF, AutoDESK provides source code in C to read and write it, so
> (hopefully) anyone more or less proficient with C could serve the
> matlab community creating a mex file once for all.
> Regards
> Carlos
> PD: Hope that my e-mail will not be too difficult to decipher!
> >> Have you actually managed to parse the AutoCad DWG or DFX
> format
> >> and
> >> import it into Matlab?
> >> Well, that's most impressive! I would be very interested in it
> >> also..
> >> do you parse lines,curves etc. or just points?
> >> it you actually import all entities then many many kudos to
> you!!
> >> why don't you just post a snippet here or put it in file
> exchange
> >> so
> >> we can all enjoy?
> >> thanks
> >> Miltiades

Subject: importing AutoCAD DXF or DWG

From: Hamid

Date: 11 Aug, 2012 04:15:07

Message: 13 of 15

Hi Carlos,
    May I have a look at that piece of code you had written. I'd also be grateful to let me know of any helpful material regarding .dwg extension that you wrote your code based on that.
Best Regards,
Hamid.

"Carlos Lopez" <clv2clv@removeThisadinet.com.uy> wrote in message <eeecc71.7@webx.raydaftYaTP>...
> I have not sent the code to matlab central because it is not good
> enough according to my standards. It deals only with isolated points,
> LINE, POLYLINE and ARC (using the DXF notation). We did not attempt
> to parse ELLIPSE, SPLINE, etc. but I guess it could be done. If you
> read in the web about DXF you will soon find that many people blame
> AutoDESK for the poor design and implementation of DXF. So, making
> reliable code to read it into matlab is pervaded by the same virus:
> you might read without problems DXF for ACAD R12, but not DXF for
> ACAD R14 neither ACAD 2000.
> I will be happy to share the present code with anyone which wants to
> have it.
> It will be a good idea to consider the new DWF format; unlike DWG and
> DXF, AutoDESK provides source code in C to read and write it, so
> (hopefully) anyone more or less proficient with C could serve the
> matlab community creating a mex file once for all.
> Regards
> Carlos
> PD: Hope that my e-mail will not be too difficult to decipher!
> >> Have you actually managed to parse the AutoCad DWG or DFX
> format
> >> and
> >> import it into Matlab?
> >> Well, that's most impressive! I would be very interested in it
> >> also..
> >> do you parse lines,curves etc. or just points?
> >> it you actually import all entities then many many kudos to
> you!!
> >> why don't you just post a snippet here or put it in file
> exchange
> >> so
> >> we can all enjoy?
> >> thanks
> >> Miltiades

Subject: importing AutoCAD DXF or DWG

From: M Dinary

Date: 20 Feb, 2013 22:56:05

Message: 14 of 15

i need to convert only lines and points ...... it will be great if we share this code ??

"Carlos Lopez" <clv2clv@removeThisadinet.com.uy> wrote in message <eeecc71.7@webx.raydaftYaTP>...
> I have not sent the code to matlab central because it is not good
> enough according to my standards. It deals only with isolated points,
> LINE, POLYLINE and ARC (using the DXF notation). We did not attempt
> to parse ELLIPSE, SPLINE, etc. but I guess it could be done. If you
> read in the web about DXF you will soon find that many people blame
> AutoDESK for the poor design and implementation of DXF. So, making
> reliable code to read it into matlab is pervaded by the same virus:
> you might read without problems DXF for ACAD R12, but not DXF for
> ACAD R14 neither ACAD 2000.
> I will be happy to share the present code with anyone which wants to
> have it.
> It will be a good idea to consider the new DWF format; unlike DWG and
> DXF, AutoDESK provides source code in C to read and write it, so
> (hopefully) anyone more or less proficient with C could serve the
> matlab community creating a mex file once for all.
> Regards
> Carlos
> PD: Hope that my e-mail will not be too difficult to decipher!
> >> Have you actually managed to parse the AutoCad DWG or DFX
> format
> >> and
> >> import it into Matlab?
> >> Well, that's most impressive! I would be very interested in it
> >> also..
> >> do you parse lines,curves etc. or just points?
> >> it you actually import all entities then many many kudos to
> you!!
> >> why don't you just post a snippet here or put it in file
> exchange
> >> so
> >> we can all enjoy?
> >> thanks
> >> Miltiades

Subject: importing AutoCAD DXF or DWG

From: Dotan Algranati

Date: 8 Mar, 2013 06:47:07

Message: 15 of 15

Dear Carlos,

I would be also very glad to receive your code in spite of the described drawbacks.

Thank you in advance

Dotan Algranati


"M Dinary" <dinary_m@yahoo.com> wrote in message <kg3ka5$mh3$1@newscl01ah.mathworks.com>...
> i need to convert only lines and points ...... it will be great if we share this code ??
>
> "Carlos Lopez" <clv2clv@removeThisadinet.com.uy> wrote in message <eeecc71.7@webx.raydaftYaTP>...
> > I have not sent the code to matlab central because it is not good
> > enough according to my standards. It deals only with isolated points,
> > LINE, POLYLINE and ARC (using the DXF notation). We did not attempt
> > to parse ELLIPSE, SPLINE, etc. but I guess it could be done. If you
> > read in the web about DXF you will soon find that many people blame
> > AutoDESK for the poor design and implementation of DXF. So, making
> > reliable code to read it into matlab is pervaded by the same virus:
> > you might read without problems DXF for ACAD R12, but not DXF for
> > ACAD R14 neither ACAD 2000.
> > I will be happy to share the present code with anyone which wants to
> > have it.
> > It will be a good idea to consider the new DWF format; unlike DWG and
> > DXF, AutoDESK provides source code in C to read and write it, so
> > (hopefully) anyone more or less proficient with C could serve the
> > matlab community creating a mex file once for all.
> > Regards
> > Carlos
> > PD: Hope that my e-mail will not be too difficult to decipher!
> > >> Have you actually managed to parse the AutoCad DWG or DFX
> > format
> > >> and
> > >> import it into Matlab?
> > >> Well, that's most impressive! I would be very interested in it
> > >> also..
> > >> do you parse lines,curves etc. or just points?
> > >> it you actually import all entities then many many kudos to
> > you!!
> > >> why don't you just post a snippet here or put it in file
> > exchange
> > >> so
> > >> we can all enjoy?
> > >> thanks
> > >> Miltiades

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

Contact us