I need to produce some plots. I know how to achieve what I want
with matlab, but there is a requirement that the final plots shall
be available as both PDFs and AutoCAD DWG files.
Have anybody tried to export plots made in matlab to DWG
format? What problems would arise?
And about the alternative, learn how to deal with AutoCAD:
Is programming plotting routines very different from programming
same with matlab?
Rune
One possibility is if you have access to Auotcad is to first create
your plot in MATLAB, output the plot in a Postscript file, next
import the postscript file into Autocad and then export the file from
Autoacad as a DWG file.
Even if you don't have access to Autocad you should be able to find
someone who sells Autocad who will do your file conversion at a
reasonable rate. If you compare the cost of trying to write your own
conversion routine with cost of having an outside service firm do the
work for you 2 to 1 says I know which one you will pick.
Howard.
It appears Autodesk removed the capability to import post script files
into Autocad in 2003. Hence my suggestion to use Autocad to convert
postscript files to DWG format files will only work if you have access
to an older version of Autocad. An alternate approach is to use free
software to convert a Matlab Plot file to a DXF format file and hen
use either Auotcad or one of the CAD programs based on Intellicad to
convert the DXF format file to a DWG format file. Software for
converting raster scan and vector graphics files to DXF format files
is more readily available than is software for converting raster scan
and vector graphics to DWG format files.
Wintopo will convert a raster scan image to a DXF image. If you use
WinTopo it will be necessary to adjust the scale of the DXF image
Wintopo produces. If you don't you will get a very small image when
you open it in Autocad. Wintopo by default uses auto scaling which
produces a very small image. I suggest you start at a 1;25 ratio.
Ghostscript, Gsview and Pstoedit can be used to convert an
encapsulated postscript file to a DXF file. Ghostscript is used to
interpret the contents of a EPS format file, Gsview provides a
graphical user interface to Ghoscript and Pstoedit and Pstoedit is
used to format the he output as a DXF file.
Sources
http://wintopo.com/
http://sourceforge.net/project/showfiles.php?group_id=1897&package_id=108733
for Ghostscript. Latest version that comes as an Windows executable
program is 8.61.
http://pages.cs.wisc.edu/~ghost/gsview/get49.htm for Gsview.
http://www.pstoedit.net/pstoedit for Psroedit
http://en.wikipedia.org/wiki/IntelliCAD_Technology_Consortium for
background information on Intellicad.
Howard