-
-
Notifications
You must be signed in to change notification settings - Fork 155
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug or Feature Not Implemented Yet
The OLE objects are not cloned/copied from a given file to a new one.
To Reproduce
using ACadSharp;
using ACadSharp.Entities;
using ACadSharp.IO;
using ACadSharp.Objects;
using CSMath;
CloneAll(@"SourceSample.dwg", @"C:TargetSample.dwg");
void CloneAll(string sourceFilePath, string targetFilePath)
{
CadDocument sourceFile;
using (DwgReader reader = new DwgReader(sourceFilePath))
{
sourceFile = reader.Read();
}
var targetFile = new CadDocument();
foreach(var entity in sourceFile.Entities)
{
targetFile.Entities.Add((Entity)entity.Clone());
}
using (var writer = new DwgWriter(targetFilePath, targetFile))
{
writer.Write();
}
}
Expected behavior
All entities should be present on the new file.
Target File, Created by AcadSharp:
Files
SampleFiles.zip
Release needed
- Yes, using the Nuget package.
- No, using the github repo.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working