I have a requirement to read a dxf file and modify the content of it.
Trying to use Ycad. I'm new to this.
A small example will be highly appreciated.
Ycad can be used to read in a dxf file for display or examination.
The ability to write the dxf back out is rudimentary and not useful without further development.
I have done some work in this area and others have implemented this ability to write the dxf back out but it is not organized and integrated into the code at this time.
The project has been idle for many years but I am well underway toward restarting development and making a new release in the next few weeks. Finishing the writing code is a planned future task.
The code has been converted from CVS to SVN and can be checked out at:
svn checkout svn://svn.code.sf.net/p/ycad/svnroot/ycad/trunk ycad-code
It is now an Eclipse project and has a new Swing based viewer as well as many unreleased fixes and features.
So, at least, I suggest you take a look at class YcadTestScan.java in package
It reads in a dxf file and prints info about the various sections of the drawing. The Yxxf drawing object has print info methods and these are used to show layers, line types, blocks and the like. Code in YcadTestScan, as an example, also scans for line entities and and prints out the start and end coordinates. Depending on what you are doing it might be easy to read and write out a modified dxf without implementing code for every part of the dxf drawing. The build.xml file has a target to run YcadTestScan.
Also, take a look at doc/dxfscan/dxfscan.c
It is a small C program that runs on the command line and can be used to visualize the contents of a dxf file. You can run it; capture the output to a file; then edit that to examine the dxf file. See the comment at the top of the source file for how to run it.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.