diff --git a/DUI3-DX/Converters/Revit/Speckle.Converters.Revit2023.DependencyInjection/Speckle.Converters.Revit2023.DependencyInjection.csproj b/DUI3-DX/Converters/Revit/Speckle.Converters.Revit2023.DependencyInjection/Speckle.Converters.Revit2023.DependencyInjection.csproj
index 810abe8b3f..8458d1fdaa 100644
--- a/DUI3-DX/Converters/Revit/Speckle.Converters.Revit2023.DependencyInjection/Speckle.Converters.Revit2023.DependencyInjection.csproj
+++ b/DUI3-DX/Converters/Revit/Speckle.Converters.Revit2023.DependencyInjection/Speckle.Converters.Revit2023.DependencyInjection.csproj
@@ -6,7 +6,7 @@
-
+
diff --git a/DUI3-DX/Converters/Revit/Speckle.Converters.Revit2023.Tests/Speckle.Converters.Revit2023.Tests.csproj b/DUI3-DX/Converters/Revit/Speckle.Converters.Revit2023.Tests/Speckle.Converters.Revit2023.Tests.csproj
index eabdeb030a..23e43c993c 100644
--- a/DUI3-DX/Converters/Revit/Speckle.Converters.Revit2023.Tests/Speckle.Converters.Revit2023.Tests.csproj
+++ b/DUI3-DX/Converters/Revit/Speckle.Converters.Revit2023.Tests/Speckle.Converters.Revit2023.Tests.csproj
@@ -14,7 +14,7 @@
-
+
diff --git a/DUI3-DX/Converters/Revit/Speckle.Converters.Revit2023.Tests/packages.lock.json b/DUI3-DX/Converters/Revit/Speckle.Converters.Revit2023.Tests/packages.lock.json
index b5cef2200d..6fdd69eb66 100644
--- a/DUI3-DX/Converters/Revit/Speckle.Converters.Revit2023.Tests/packages.lock.json
+++ b/DUI3-DX/Converters/Revit/Speckle.Converters.Revit2023.Tests/packages.lock.json
@@ -65,9 +65,9 @@
},
"Speckle.Revit2023.Interfaces": {
"type": "Direct",
- "requested": "[0.1.1-preview.0.22, )",
- "resolved": "0.1.1-preview.0.22",
- "contentHash": "Z6bfEIKFYJtXPjHQYlGBjiQLekVOU7L//H9gaQIw3ba9jqJeYHx5AV0z6S83g04eGBKkNJC6EwBr+fspsK0f+w=="
+ "requested": "[0.1.1-preview.0.23, )",
+ "resolved": "0.1.1-preview.0.23",
+ "contentHash": "H66I9JRUGt1l1YS8aOdniRPDOixRPqua9puGrhGnTEKJ26kVlgkM3FpKfdAMFea4hf03hdqhnFVmNEwgA6mPHA=="
},
"Castle.Core": {
"type": "Transitive",
@@ -499,7 +499,7 @@
"dependencies": {
"Speckle.Autofac": "[2.0.999-local, )",
"Speckle.Objects": "[2.0.999-local, )",
- "Speckle.Revit2023.Interfaces": "[0.1.1-preview.0.22, )"
+ "Speckle.Revit2023.Interfaces": "[0.1.1-preview.0.23, )"
}
},
"speckle.converters.common.dependencyinjection": {
@@ -513,7 +513,7 @@
"type": "Project",
"dependencies": {
"Speckle.Converters.Common": "[2.0.999-local, )",
- "Speckle.Revit2023.Interfaces": "[0.1.1-preview.0.22, )"
+ "Speckle.Revit2023.Interfaces": "[0.1.1-preview.0.23, )"
}
},
"Speckle.Core": {
diff --git a/DUI3-DX/Converters/Revit/Speckle.Converters.Revit2023/Speckle.Converters.Revit2023.csproj b/DUI3-DX/Converters/Revit/Speckle.Converters.Revit2023/Speckle.Converters.Revit2023.csproj
index 7fe5bd12ca..f2fe665f57 100644
--- a/DUI3-DX/Converters/Revit/Speckle.Converters.Revit2023/Speckle.Converters.Revit2023.csproj
+++ b/DUI3-DX/Converters/Revit/Speckle.Converters.Revit2023/Speckle.Converters.Revit2023.csproj
@@ -9,7 +9,7 @@
-
+
diff --git a/DUI3-DX/Converters/Revit/Speckle.Converters.RevitShared/Helpers/DisplayValueExtractor.cs b/DUI3-DX/Converters/Revit/Speckle.Converters.RevitShared/Helpers/DisplayValueExtractor.cs
index 2e5eaa8f4f..83cd6a4dd6 100644
--- a/DUI3-DX/Converters/Revit/Speckle.Converters.RevitShared/Helpers/DisplayValueExtractor.cs
+++ b/DUI3-DX/Converters/Revit/Speckle.Converters.RevitShared/Helpers/DisplayValueExtractor.cs
@@ -294,24 +294,24 @@ bool hasSymbolGeom
///
/// We're caching a dictionary of graphic styles and their ids as it can be a costly operation doing Document.GetElement(solid.GraphicsStyleId) for every solid
///
- private readonly Dictionary _graphicStyleCache = new();
+ private readonly Dictionary _graphicStyleCache = new();
///
/// Exclude light source cones and potentially other geometries by their graphic style
///
private bool IsSkippableGraphicStyle(IRevitElementId id, IRevitDocument doc)
{
- if (!_graphicStyleCache.ContainsKey(id.ToString()))
+ var graphicStyle = doc.GetElement(id)?.ToGraphicsStyle();
+ if (graphicStyle is null)
{
- _graphicStyleCache.Add(id.ToString(), doc.GetElement(id).NotNull().ToGraphicsStyle().NotNull());
+ return false;
+ }
+ if (!_graphicStyleCache.ContainsKey(id.IntegerValue))
+ {
+ _graphicStyleCache.Add(id.IntegerValue, graphicStyle);
}
- var graphicStyle = _graphicStyleCache[id.ToString()];
-
- if (
- graphicStyle != null
- && graphicStyle.GraphicsStyleCategory.Id.IntegerValue == (int)RevitBuiltInCategory.OST_LightingFixtureSource
- )
+ if (graphicStyle.GraphicsStyleCategory.Id.IntegerValue == (int)RevitBuiltInCategory.OST_LightingFixtureSource)
{
return true;
}
diff --git a/DUI3-DX/Converters/Revit/Speckle.Converters.RevitShared/Helpers/ParameterObjectAssigner.cs b/DUI3-DX/Converters/Revit/Speckle.Converters.RevitShared/Helpers/ParameterObjectAssigner.cs
index 5b543a70f2..b7b493d064 100644
--- a/DUI3-DX/Converters/Revit/Speckle.Converters.RevitShared/Helpers/ParameterObjectAssigner.cs
+++ b/DUI3-DX/Converters/Revit/Speckle.Converters.RevitShared/Helpers/ParameterObjectAssigner.cs
@@ -36,7 +36,7 @@ public void AssignParametersToBase(IRevitElement target, Base @base)
AssignSpeckleParamToBaseObject(instanceParameters, paramBase);
// POC: Some elements can have an invalid element type ID, I don't think we want to continue here.
- if (elementId != _revitElementIdUtils.InvalidElementId && target is not SOBE.Level) //ignore type props of levels..!
+ if (elementId.IntegerValue != _revitElementIdUtils.InvalidElementId.IntegerValue && target is not SOBE.Level) //ignore type props of levels..!
{
var elementType = target.Document.GetElement(elementId).NotNull();
// I don't think we should be adding the type parameters to the object like this
diff --git a/DUI3-DX/Converters/Revit/Speckle.Converters.RevitShared/Raw/LocationConversionToSpeckle.cs b/DUI3-DX/Converters/Revit/Speckle.Converters.RevitShared/Raw/LocationConversionToSpeckle.cs
index ffba569ce6..ac47cb38cf 100644
--- a/DUI3-DX/Converters/Revit/Speckle.Converters.RevitShared/Raw/LocationConversionToSpeckle.cs
+++ b/DUI3-DX/Converters/Revit/Speckle.Converters.RevitShared/Raw/LocationConversionToSpeckle.cs
@@ -36,7 +36,7 @@ public Base Convert(IRevitLocation target)
var point = target.ToLocationPoint();
if (point is not null)
{
- _xyzConverter.Convert(point.Point);
+ return _xyzConverter.Convert(point.Point);
}
throw new SpeckleConversionException($"Unexpected location type {target.GetType()}");
}
diff --git a/DUI3-DX/Sdk/Speckle.Converters.Common/Speckle.Converters.Common.csproj b/DUI3-DX/Sdk/Speckle.Converters.Common/Speckle.Converters.Common.csproj
index f9162e3030..761f021575 100644
--- a/DUI3-DX/Sdk/Speckle.Converters.Common/Speckle.Converters.Common.csproj
+++ b/DUI3-DX/Sdk/Speckle.Converters.Common/Speckle.Converters.Common.csproj
@@ -4,7 +4,7 @@
netstandard2.0
-
+