Open
Description
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
Problem 2: Different color on a ByLayer Entity
Problem 3: OLE 2 Entity missing