Skip to content

Commit

Permalink
Fix CurtainPanel.ByElements bug (#3057)
Browse files Browse the repository at this point in the history
REVIT-219424
* fix the node to return the list of curtain panels in a curtain wall in cases when some curtain panels are doors or windows
  • Loading branch information
AdrianaStanica authored Mar 26, 2024
1 parent 448f29b commit d7d5abb
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.6.12
0.6.13
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.6.13
* Fix CurtainPanel.ByElements displaying invalid ElementIds when Curtain Panels have their types changed to a different wall

## 0.6.12
* Fix CurtainPanel.ByElements failing to return when there is a door or window present in the curtain wall

Expand Down
10 changes: 9 additions & 1 deletion src/Libraries/RevitNodes/Elements/CurtainPanel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,15 @@ public static CurtainPanel[] ByElement(Element hostingElement)
var panel = DocumentManager.Instance.CurrentDBDocument.GetElement(idPanel);
if (panel is Autodesk.Revit.DB.Panel)
{
result.Add(CurtainPanel.FromExisting(panel as Autodesk.Revit.DB.Panel, true));
ElementId hostPanelId = (panel as Panel).FindHostPanel();
if (hostPanelId.IntegerValue != -1)
{
result.Add(null);
}
else
{
result.Add(CurtainPanel.FromExisting(panel as Autodesk.Revit.DB.Panel, true));
}
}
else
{
Expand Down

0 comments on commit d7d5abb

Please sign in to comment.