From 26e176d8c73e8d7b80abc8d9f7cf0e29d9fd54a4 Mon Sep 17 00:00:00 2001 From: DomCR Date: Wed, 13 Nov 2024 18:15:59 +0100 Subject: [PATCH] fix for edata for dxf files --- src/ACadSharp/IO/Templates/CadTemplate.cs | 12 ++++++++++++ src/CSUtilities | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/ACadSharp/IO/Templates/CadTemplate.cs b/src/ACadSharp/IO/Templates/CadTemplate.cs index 2feab505..2f61f8da 100644 --- a/src/ACadSharp/IO/Templates/CadTemplate.cs +++ b/src/ACadSharp/IO/Templates/CadTemplate.cs @@ -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 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 getEntitiesCollection(CadDocumentBuilder builder, ulong firstHandle, ulong endHandle) diff --git a/src/CSUtilities b/src/CSUtilities index 5019840e..041deaf6 160000 --- a/src/CSUtilities +++ b/src/CSUtilities @@ -1 +1 @@ -Subproject commit 5019840ee60ea9bc28dc23c136c39eca2b3738f2 +Subproject commit 041deaf69322f64fe27b42fa6f482f14991dc82e