Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revit Connector: Gutters not converted when sending "everything" #3615

Open
5 tasks done
ks-cph opened this issue Aug 14, 2024 · 5 comments
Open
5 tasks done

Revit Connector: Gutters not converted when sending "everything" #3615

ks-cph opened this issue Aug 14, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@ks-cph
Copy link
Contributor

ks-cph commented Aug 14, 2024

Prerequisites

What package are you referring to?

Backend

Describe the bug

I am trying to send a model in Revit 2023 with roofs and gutters. When sending "everything", the gutters are not converted. However, when selecting them and sending "selection", they are converted correctly.

To Reproduce

Steps to reproduce the behavior:

  1. Create a Revit model with gutters and roofs
  2. Click on Send everything
  3. Open the stream on Speckle
  4. See that the gutters are missing

Expected behavior

We would expect the gutters also to be streamed when sending "everything"

Proposed Solution

The error is somewhere in ConnectorRevitUtils:

//get elements of supported categories
var categoryIds = cache
.GetOrInitializeWithDefaultFactory<Category>()
.GetAllObjects()
.Select(category => category.Id)
.ToList();

The category OST_Gutter has not been added. When manually adding OST_Gutter with the id -2001391, the Gutters are correctly converted even when sending "everything".

I do not understand what exactly is going on in GetOrInitializeWithDefaultFactory, so I can neither propose a solution.

@ks-cph ks-cph added the bug Something isn't working label Aug 14, 2024
Copy link

linear bot commented Aug 14, 2024

@ks-cph
Copy link
Contributor Author

ks-cph commented Aug 15, 2024

I noticed that the same behavior occurs for elements of the category Soffit and Fascia.

@martinromby
Copy link

Any guidance to how we better can understand GetOrInitializeWithDefaultFactory and propose a solution here @bimgeek ?

@clairekuang
Copy link
Member

clairekuang commented Oct 11, 2024

Do these element types not fall under the types of categories listed in this method? ->
https://github.com/specklesystems/speckle-sharp/blob/main/ConnectorRevit/RevitSharedResources/Helpers/Extensions.cs#L64

It may be that the category is not being registered as supported, see this line:

@ks-cph
Copy link
Contributor Author

ks-cph commented Oct 14, 2024

They are exported when selected explicitly and sent by "Selection." So they should be supported, shouldn't they? The sending "forgets" them when sending "everything."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants