specklesystems / speckle-sharp

.NET SDK, Schema and Connectors: Revit, Rhino, Grasshopper, Dynamo, ETABS, AutoCAD, Civil3D & more.
https://speckle.systems
Apache License 2.0
380 stars 173 forks source link

bug(revit): duplication receiving light fixtures into revit #2438

Open dtnaughton opened 1 year ago

dtnaughton commented 1 year ago

Prerequisites

Originally flagged here on community forum, but creating issue for better tracking.

What package are you referring to?

speckle-sharp, revit connector (V22)

Describe the bug

Sending light fixtures from Revit to Speckle to consume in another Revit model is duplicating objects when using ‘Update’ feature on receive.

To Reproduce

Send these light fixtures (qty: 100) to Speckle and consume in another Revit model: image

Update the location of lights (qty: 100) to align, and send to Speckle again, once again consuming into the other Revit model: image

Final result (qty 200):

image

Expected behavior

The lighting fixture objects are superimposed upon on another, rather than updating the objects, leading to a qty of 200, as opposed to 100.

Screenshots

System Info

If applicable, please fill in the below details - they help a lot!

Desktop (please complete the following information):

Failure Logs

Additional context

Proposed Solution (if any)

Optional: Affected Projects

teocomi commented 1 year ago

Hey @dtnaughton can you still repro with the latest release? Otherwise, can you share your sample file for testing, please?

dtnaughton commented 1 year ago

I just tested with v2.14.0-rc1. If I keep the instance of Revit open for both receives, the objects update without duplication. However, if I close the instance of Revit and reopen between receiving the first commit and the second, the duplication occurs on the second receive.

This is tested using Revit 22. Here's an XYZ stream with the data from the model. To recreate, I received the commit objs into a different Revit model than the source one. Github doesn't support attaching Revit file types, so I will send you the source model in a DM on the community forum.

JR-Morgan commented 1 year ago

I'll investigate, I recently discovered we are converting (ToSpeckle) lighting fixtures as Network objects. I'm thinking potentially our update behaviour of networks is bugged in some way.

@clairekuang mentioned the possibility that we could simply send Lighting Fixtures not as Networks, but simply RevitFamilyInstances. But ideally we'd also ensure Networks can be updated.

@clairekuang, are you aware of any current issues with networks and update mode?

teocomi commented 1 year ago

Test file uploaded here: https://drive.google.com/file/d/1YY7nHkDvFoIoMKt9jHyGyjbE1Ipk6R5L/view?usp=share_link