Skip to content

Commit

Permalink
Merge pull request #485 from specklesystems/dimitrie/cnx-124-conversi…
Browse files Browse the repository at this point in the history
…on-of-areas-and-rooms-cannot-handle-more-complex

fix: ignoring extra categories we cannot support correctly
  • Loading branch information
didimitrie authored Jan 10, 2025
2 parents e955617 + 49ef7d1 commit c1c8b64
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ public static bool IsSupportedCategory(Category category)
return (
category.CategoryType == CategoryType.Model
// || category.CategoryType == CategoryType.AnalyticalModel
) && category.IsVisibleInUI;
)
#if REVIT_2023_OR_GREATER
&& category.BuiltInCategory != BuiltInCategory.OST_AreaSchemes
&& category.BuiltInCategory != BuiltInCategory.OST_AreaSchemeLines
#else
&& category.Name != "OST_AreaSchemeLines"
&& category.Name != "OST_AreaSchemes"
#endif
&& category.IsVisibleInUI;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ public RevitObject Convert(DB.Element target)
}
catch (ValidationException)
{
// NOTE: i've improved the if check above to make sure we never reach here
// we were throwing a lot here for various elements (e.g. floors) and we would
// be slowing things down
// location was not a supported, do not attach to base element
}
}
Expand Down

0 comments on commit c1c8b64

Please sign in to comment.