Skip to content

Diferences on the file created by AcadSharp #458

Open
@thaiguer

Description

@thaiguer

Hello,

I used the following code to copy entities from one file to a new one:

using ACadSharp;
using ACadSharp.IO;

Console.WriteLine("Hello, World!");

string sourceFile = @"C:\dev\tablet.dwg";
string targetFile = @"C:\dev\just a drawing222.dwg";

using (DwgReader reader = new DwgReader(sourceFile))
{
    CadDocument doc = reader.Read();
    CadDocument newDoc = new CadDocument();

    foreach (var entity in doc.Entities)
    {
        doc.Entities.Remove(entity);
        newDoc.Entities.Add(entity);
    }

    using (DwgWriter writer = new DwgWriter(targetFile, newDoc))
    {
        writer.Write();
    }
}

I attached the source and the target file. files.zip
The problem is that there are a few differences and some missing entities in the target file.

Problem 1: Hatches missing inside Block References

Source:
image

Target:
image

Problem 2: Different color on a ByLayer Entity

Source:
image

Target:
image

Problem 3: OLE 2 Entity missing

Source:
image

Target:
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions