Skip to content

Commit

Permalink
Merge pull request #488 from DomCR/dxf-extended-data
Browse files Browse the repository at this point in the history
Read EData in Dxf files
  • Loading branch information
DomCR authored Nov 13, 2024
2 parents 3be9c45 + 26e176d commit d11de9f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions src/ACadSharp/IO/Templates/CadTemplate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,18 @@ public virtual void Build(CadDocumentBuilder builder)
builder.Notify($"AppId in extended data with handle {item.Key} not found", NotificationType.Warning);
}
}

foreach (KeyValuePair<string, ExtendedData> item in this.EDataTemplateByAppName)
{
if (builder.TryGetTableEntry(item.Key, out AppId app))
{
this.CadObject.ExtendedData.Add(app, item.Value);
}
else
{
builder.Notify($"AppId in extended data with handle {item.Key} not found", NotificationType.Warning);
}
}
}

protected IEnumerable<T> getEntitiesCollection<T>(CadDocumentBuilder builder, ulong firstHandle, ulong endHandle)
Expand Down

0 comments on commit d11de9f

Please sign in to comment.