Skip to content

Comments

fix(revit) #3615: include gutters and other subcategories in Revit connector sending "everything"#3695

Merged
JR-Morgan merged 6 commits intospecklesystems:devfrom
jcesarpolo:fix/issue-3615
Apr 16, 2025
Merged

fix(revit) #3615: include gutters and other subcategories in Revit connector sending "everything"#3695
JR-Morgan merged 6 commits intospecklesystems:devfrom
jcesarpolo:fix/issue-3615

Conversation

@jcesarpolo
Copy link
Contributor

@jcesarpolo jcesarpolo commented Mar 14, 2025

Description & motivation

Changes:

  • Modified IRevitDocumentCacheExtensions.cs:
    • Previously CacheInitializer() looped only through the categories in Autodesk.Revit.DB.Document.Settings.Categories which returns only the top-level categories, ommiting some supported model categories.
    • Updated CacheInitializer() method to correctly include the mentioned subcategories.

Screenshots:

Model exported from Revit sending "everything"
image

Result on Speckle. No Gutters
image

Result on Speckle after the fix (Roof Soffits also tested)
image

Validation of changes:

  • Tested on all supported versions of Revit to confirm the fix works across different versions.
  • Avoided looping through all built-in subcategories to prevent unexpected results for unknown subcategories.
  • Below is an example of artifacts that appeared when including all built-in subcategories supported:
    image

Checklist:

  • My pull request follows the guidelines in the Contributing guide?
  • My pull request does not duplicate any other open Pull Requests for the same update/change?
  • My commits are related to the pull request and do not amend unrelated code or documentation.
  • My code follows a similar style to existing code.
  • I have added appropriate tests.
  • I have updated or added relevant documentation.

@didimitrie
Copy link
Member

Thank you @jcesarpolo, this looks simple enough to review and merge!

@JR-Morgan JR-Morgan changed the base branch from main to dev April 11, 2025 14:39
@JR-Morgan JR-Morgan self-assigned this Apr 11, 2025
@JR-Morgan JR-Morgan added this to the 2.22 milestone Apr 11, 2025
Copy link
Member

@JR-Morgan JR-Morgan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested in 2022 and 2025. lgtm

@JR-Morgan
Copy link
Member

yep, so this adds extra categories (see diff) to both the Categories filter and Everything filter (since they use the same internal cache.

This is good, I've checked it works correctly for both filters, and that it doesn't lead to duplicate elements, we simply were not sending categories like wall sweep and gutters from either the Categories or Everything filters before.

I just want to do a final check in Revit 2021, since there may be differences in categories behave in the older versions

@JR-Morgan
Copy link
Member

2021 looks ok

@JR-Morgan JR-Morgan merged commit d0dea60 into specklesystems:dev Apr 16, 2025
31 checks passed
@JR-Morgan JR-Morgan linked an issue Apr 16, 2025 that may be closed by this pull request
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Revit Connector: Gutters not converted when sending "everything"

3 participants