24 people following this project (follow)

netDxf

netDxf 0.1, Copyright(C) 2009 Daniel Carvajal, Licensed under LGPL

Description

netDxf is a .net library programmed in C# to read and write AutoCAD dxf ASCII files. At the moment it supports AutoCad12, AutoCad2000, AutoCad2004 and AutoCad2007 versions.

I tried to keep the use as simple as posible, for example you want need to fill up the table section with layers, styles or line type definition. The DxfDocument will take care of that everytime a new item is added and the load and save its done with just one line of code.
If you need more information, you can find the official dxf documentation in
http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=12272454&linkID=10809853

Code example:
public static void Main()
   { 
      DxfDocument dxf = new DxfDocument();
      // add your entities here
      dxfDocument.AddEntity(entity);
      // save to file
      dxf.Save(filename);
      // load file
      dxf.Load(filename);
   } 

Samples and Demos

Are contained in the download.
Well, at the moment they are just tests for the work in progress.

Dependencies and distribution

  • .NET Framework 2.0

Compiling

To compile netDxf you need:
  • Visual Studio 2008 SP1

Development Status

Alfa status.

Supported entities

  • 3dFace
  • Arc
  • Circle
  • Ellipse
  • Insert (block references and attributes)
  • LightweightPolylines
  • Line
  • Point
  • Polyline
  • Polyline3d
  • PolyfaceMesh
  • Solid
  • Text
All entities might contain extended data information.
The libray will never be able to read some entities like Regions and 3dSolids, since they depend on propietary data.

Future plans

Read and write Splines.
Write better samples.
Add dimensions and hatches.

Last edited Mar 7 2009 at 7:00 AM by haplokuon, version 8