diff --git a/Revit_Core_Engine/Query/SpecFromName.cs b/Revit_Core_Engine/Query/SpecFromName.cs index c173a9ba9..c0047fcfb 100644 --- a/Revit_Core_Engine/Query/SpecFromName.cs +++ b/Revit_Core_Engine/Query/SpecFromName.cs @@ -93,6 +93,8 @@ private static void CollectSpecs() #else private static void CollectSpecs() { + BH.Engine.Base.Compute.StartSuppressRecordingEvents(true, true, true); + m_SpecsWithNames = new Dictionary(); foreach (PropertyInfo info in typeof(SpecTypeId).GetProperties()) { @@ -100,6 +102,8 @@ private static void CollectSpecs() if (unitType != null) m_SpecsWithNames.Add(info.Name, unitType); } + + BH.Engine.Base.Compute.StopSuppressRecordingEvents(); } diff --git a/Revit_Core_Engine/Query/UnitFromName.cs b/Revit_Core_Engine/Query/UnitFromName.cs index c14ba690e..b8832c33c 100644 --- a/Revit_Core_Engine/Query/UnitFromName.cs +++ b/Revit_Core_Engine/Query/UnitFromName.cs @@ -93,6 +93,8 @@ private static void CollectUnits() private static void CollectUnits() { + BH.Engine.Base.Compute.StartSuppressRecordingEvents(false, true, true); + m_UnitsWithNames = new Dictionary(); foreach (PropertyInfo info in typeof(UnitTypeId).GetProperties()) { @@ -100,6 +102,8 @@ private static void CollectUnits() if (unitType != null) m_UnitsWithNames.Add(info.Name, unitType); } + + BH.Engine.Base.Compute.StopSuppressRecordingEvents(); }