From f2e5ff2a72ca31ab8b1118c0bfce9ed260312916 Mon Sep 17 00:00:00 2001 From: Craig Long Date: Tue, 30 Apr 2024 18:27:08 -0400 Subject: [PATCH] Fix regression in FamilyType.ByGeometry Node (#3067) * CP fix for FamilyType.ByGeometry * Update version / changelog --- .version | 2 +- CHANGELOG.md | 3 +++ .../RevitNodes/GeometryConversion/ProtoToRevitSolid.cs | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.version b/.version index ec92ab1e1..41289297a 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -0.6.17 \ No newline at end of file +0.6.18 \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index da1fe8efe..8b99b0171 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 0.6.18 +* Fix regression on FamilyInstance.ByGeometry node + ## 0.6.17 * Version back DynamoRevit to 3.1 diff --git a/src/Libraries/RevitNodes/GeometryConversion/ProtoToRevitSolid.cs b/src/Libraries/RevitNodes/GeometryConversion/ProtoToRevitSolid.cs index 9880da4e8..ea7e4d33e 100644 --- a/src/Libraries/RevitNodes/GeometryConversion/ProtoToRevitSolid.cs +++ b/src/Libraries/RevitNodes/GeometryConversion/ProtoToRevitSolid.cs @@ -176,6 +176,8 @@ public static Autodesk.Revit.DB.FamilySymbol ToRevitFamilyType( var solids = GetSolidsFromElement(familyDocument.GetElement(importedElementId)); // delete imported sat + // first unpin the element to avoid an exception when deleting the SAT import + familyDocument.GetElement(importedElementId).Pinned = false; familyDocument.Delete(importedElementId); System.IO.File.Delete(tempFile);