Skip to content

atph/Dxf

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IxMilia.Dxf

A portable .NET library for reading and writing DXF and DXB files. Clone and build locally or directly consume the NuGet package.

Usage

Open a DXF file:

using System.IO;
using IxMilia.Dxf;
using IxMilia.Dxf.Entities;
// ...
DxfFile dxfFile;
using (FileStream fs = new FileStream(@"C:\Path\To\File.dxf", FileMode.Open))
{
    dxfFile = DxfFile.Load(fs);
}

foreach (DxfEntity entity in dxfFile.Entities)
{
    switch (entity.EntityType)
    {
        case DxfEntityType.Line:
            DxfLine line = (DxfLine)entity;
            // ...
            break;
        // ...
    }
}

Save a DXF file:

using System.IO;
using IxMilia.Dxf;
using IxMilia.Dxf.Entities;
// ...

DxfFile dxfFile = new DxfFile();
dxfFile.Entities.Add(new DxfLine(new DxfPoint(0, 0, 0), new DxfPoint(50, 50, 0)));
// ...

using (FileStream fs = new FileStream(@"C:\Path\To\File.dxf", FileMode.Open))
{
    dxfFile.Save(fs);
}

Status

  • HEADER section - complete R10 through R2014
  • CLASSES section - complete R10 through R2014
  • TABLES section - complete R10 through R2014
  • BLOCKS section - complete R10 through R2014
  • ENTITIES section
    • common complete R10 through R2014
    • entities complete R10 through R2014 EXCEPT
      • HATCH
      • MESH
      • MLEADER
      • SURFACE
      • TABLE
      • VIEWPORT
  • OBJECTS section - NYI

DXF reference

See spec/DXF Specification.md for links to the full Autodesk DXF specification.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 100.0%