From 8631bb8ec7494116a3b2cdfbd282299de51fd4f8 Mon Sep 17 00:00:00 2001 From: "Dr. Matthias Menningen" Date: Fri, 28 Nov 2025 09:38:14 +0100 Subject: [PATCH 1/2] - New DictionaryVariables --- .../DWG/DwgStreamReaders/DwgObjectReader.cs | 7 +++ src/ACadSharp/Objects/DictionaryVariable.cs | 56 ++++++++++++++++++- src/CSUtilities | 2 +- 3 files changed, 63 insertions(+), 2 deletions(-) diff --git a/src/ACadSharp/IO/DWG/DwgStreamReaders/DwgObjectReader.cs b/src/ACadSharp/IO/DWG/DwgStreamReaders/DwgObjectReader.cs index 14a4e45a4..67d543928 100644 --- a/src/ACadSharp/IO/DWG/DwgStreamReaders/DwgObjectReader.cs +++ b/src/ACadSharp/IO/DWG/DwgStreamReaders/DwgObjectReader.cs @@ -160,6 +160,13 @@ public void Read() { //Read the object template = this.readObject(type); + + if (this._classes.TryGetValue((short)type, out DxfClass dxf)) { + this._builder.Notify($"Successfully read {dxf.DxfName} number {dxf.ClassNumber} with handle: {handle}", NotificationType.None); + } + else { + this._builder.Notify($"Successfully read {type} with handle: {handle}", NotificationType.None); + } } catch (Exception ex) { diff --git a/src/ACadSharp/Objects/DictionaryVariable.cs b/src/ACadSharp/Objects/DictionaryVariable.cs index 7006634c3..d24936e96 100644 --- a/src/ACadSharp/Objects/DictionaryVariable.cs +++ b/src/ACadSharp/Objects/DictionaryVariable.cs @@ -14,12 +14,66 @@ namespace ACadSharp.Objects public class DictionaryVariable : NonGraphicalObject { /// - /// Represents the name of the current multi-leader style. + /// The name of the system variable that represents the current annotation + /// scale for the current space. + /// + /// + /// string, initial value: 1:1 + /// + public const string CurrentAnnotationStyle = "CANNOSCALE"; + + /// + /// The name of the system variable that represents of the current multi-leader style. /// /// This constant is used to identify the current multi-leader style in the application. The value is /// a string literal: "CMLEADERSTYLE". public const string CurrentMultiLeaderStyle = "CMLEADERSTYLE"; + /// + /// The name of system variable that represents the current table style. + /// + /// + /// string, initial value: Standard + /// + public const string CurrentTableStyle = "CTABLESTYLE"; + + /// + /// The name of the system variable that represents of the current detail view style. + /// The current detail view style controls the appearance of all + /// new model documentation detail views, detail boundaries and + /// leader lines you create. + /// + /// + /// string, intial value: Imperial24 (imperial) or Metric50 (metric) + /// + public const string CurrentViewDetailStyle = "CVIEWDETAILSTYLE"; + + /// + /// The name of the system variable that represents the name of + /// the current section view style. + /// The current section view style controls the appearance of all + /// new model documentation section views and section lines you create. + /// + public const string CurrentViewSectionStyle = "CVIEWSECTIONSTYLE"; + + /// + /// The name of the system variable that controls the display + /// of frames for wipeout objects. + /// + /// Integer, initial value: 1, allowed values: + /// + /// + /// 0 Frames are not displayed or plotted
+ /// Frames are temporarily displayed for object selection and selection preview. + ///
+ /// 1 Frames are displayed and plotted + /// + /// 2 Frames are displayed, but not plotted + /// + ///
+ ///
+ public const string WipeoutFrame = "WIPEOUTFRAME"; + /// public override string ObjectName => DxfFileToken.ObjectDictionaryVar; diff --git a/src/CSUtilities b/src/CSUtilities index 9a495b2f8..e818c3ad0 160000 --- a/src/CSUtilities +++ b/src/CSUtilities @@ -1 +1 @@ -Subproject commit 9a495b2f8810318477d63c4aa970ba21a659a95f +Subproject commit e818c3ad0cdf494b0be80e9c62b6498b30e41dd7 From 9ec5805c792a746668616264b27975661a9b048e Mon Sep 17 00:00:00 2001 From: "Dr. Matthias Menningen" Date: Mon, 8 Dec 2025 10:25:00 +0100 Subject: [PATCH 2/2] - Initialize variables --- src/ACadSharp/Objects/CadDictionary.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ACadSharp/Objects/CadDictionary.cs b/src/ACadSharp/Objects/CadDictionary.cs index a4bb907b8..98d4e0be3 100644 --- a/src/ACadSharp/Objects/CadDictionary.cs +++ b/src/ACadSharp/Objects/CadDictionary.cs @@ -194,6 +194,10 @@ public static void CreateDefaultEntries(CadDictionary root) MultiLeaderStyle.DefaultName ); variableDictionary.TryAdd(cmLeaderStyleEntry); + variableDictionary.TryAdd(new DictionaryVariable(DictionaryVariable.CurrentAnnotationStyle, "1:1")); + variableDictionary.TryAdd(new DictionaryVariable(DictionaryVariable.CurrentTableStyle, "Standard")); + variableDictionary.TryAdd(new DictionaryVariable(DictionaryVariable.CurrentViewDetailStyle, "Metric50")); + variableDictionary.TryAdd(new DictionaryVariable(DictionaryVariable.CurrentViewSectionStyle, "Metric50")); //DictionaryVars Entry DIMASSOC and HIDETEXT ??