From 1b7b9bd369dad6404fd14ee25b0b9603612c07f2 Mon Sep 17 00:00:00 2001 From: DomCR Date: Thu, 2 Jan 2025 08:44:18 +0100 Subject: [PATCH] bild fix --- src/ACadSharp/IO/Templates/EvaluationGraphTemplate.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/ACadSharp/IO/Templates/EvaluationGraphTemplate.cs b/src/ACadSharp/IO/Templates/EvaluationGraphTemplate.cs index 9dcb57c1..210ec3da 100644 --- a/src/ACadSharp/IO/Templates/EvaluationGraphTemplate.cs +++ b/src/ACadSharp/IO/Templates/EvaluationGraphTemplate.cs @@ -5,14 +5,13 @@ namespace ACadSharp.IO.Templates { internal class EvaluationGraphTemplate : CadTemplate { + public IDictionary NodeHandles { get; } = new Dictionary(); public EvaluationGraphTemplate(EvaluationGraph evaluationGraph) : base(evaluationGraph) { } - public IDictionary NodeHandles { get; } = new Dictionary(); - public override void Build(CadDocumentBuilder builder) { base.Build(builder); @@ -20,9 +19,13 @@ public override void Build(CadDocumentBuilder builder) foreach (EvaluationGraph.GraphNode node in this.CadObject.Nodes) { var nodeHandle = this.NodeHandles[node]; - if (builder.TryGetCadObject(nodeHandle, out CadObject nodeObject)) + if (builder.TryGetCadObject(nodeHandle, out EvaluationExpression evExpression)) + { + node.NodeObject = evExpression; + } + else { - node.NodeObject = nodeObject; + builder.Notify($"Evaluation graph with handle {this.CadObject.Handle} couldn't find the EvaluationExpression with handle {nodeHandle}", NotificationType.Warning); } } }