Open htlcnn opened 4 years ago
I'll have a look, we clearly need some docs on how to debug the revit client first!
I can confirm it's failing on the line you highlighted, the base curve of those beames is an arc and Speckle is only accepting lines. I think the solution is to change the speckle beam definition to take a SpeckleObject instead of a SpeckleLine.
I'll attempt a fix in the next days, in the meantime if you want to give it a go you can debug this project alone without needing to debug the actual SpeckleRevit plugin:
@teocomi generally anything can be a SpeckleObject. Does changing from SpeckleLine to SpeckleObject make it harder to re-create Revit's curve-based beams from stream data?
The only issue I see with changing them to SpeckleObject is in Grasshopper, it might break some conversions there and potentially old scripts using beams... I'll do some testing this week and let you know!
Hey @htlcnn I've switched SpeckleLine
to SpeckleObject
, seems to work fine now: https://hestia.speckle.works/#/view/ZuQXiLh1Z
We didn't detect issues in Grasshopper, I'm making a pre-release with the change now so you can test as well, let us know if it works for you too!
@teocomi Looks like they're all converted successfully. I'm waiting for the release to test in Revit. Thanks!
Sweet, there you go: https://github.com/speckleworks/SpeckleInstaller/releases/tag/1.8.20
@teocomi I tried that new Speckle release, only 21/63 elements in the view were converted. Some conversion errors didn't have Element ID like old Speckle version.
new stream ID on hestia: CeFAxt6Oh
I'm using Revit 2019's addin for my Revit 2018 version.
We can't guarantee the plugin will work on Revit 2018, but I tested on 2019 and it seemed to work fine as well. I selected the elements by category (structural framing), out of 357 only 1 failed.
Any chance you could try with a newer version of Revit?
Did you view the stream online? I tried sending Structural Framings category, notification was "failed to convert 1 objects", clicking on ... shows more failed items with no Id. My stream contains only 300/357 items. I think there were exceptions with In-Place elements of category structural framings. In-place elements' Location is LocationPoint, not LocationCurve, so it will be null when you cast it to LocationCurve: https://github.com/speckleworks/SpeckleElements/blob/master/SpeckleElementsRevit/ConversionRoutines/BeamBrace.cs#L136-L137
Hey, not sure I follow :) I checked your stream online and only a few elements are showing up. This is what I get when I send the stream instead: https://hestia.speckle.works/#/view/qePiW42Wz It seems that 355/357 elements are converted correctly...
When you refer to in-place elements, are they in the sample model (KC GARA) you sent?
Sorry, I checked it again. There are only 2 in-place elements in the sample model. Their IDs: 920813, 930627 (1 of Floor, 1 of Structural Framing category). My 300/357 stream was sent using Revit 2020.2. I know how to open cefsharp devtools but I don't know how to find failed items.
Gotcha, we should be able to handle point based families too... I'll have a look! Conversion failures should show in in SpeckleElementsRevit, so you'd just need to debug that project, instead of the whole SpeckleRevit+UI thing :)
Alright, I've added support for in-place beams. Works sending out of Revit but not back in for now... Will make a release in the next days! You can rebuild Elements locally if you want to try (and make sure SpeckleElementsRevit.dll is copied to the Kits folder), or use the attached one.
Thanks for fixing the issue. I'm afraid I'd have to wait for a SpeckleInstaller release to test because I forgot how speckle libs are nested into each other :cry:
Just replace the SpeckleElementsRevit.dll
in %localappdata%\SpeckleKits\SpeckleElements
:)
Thanks. I didn't know they're in localappdata. I thought all were in appdata. I replaced my SpeckleElementsRevit.dll with your new one. I used Revit 2020.2 to create sender. Conversion still failed on numerous elements, only one of them had Element ID: 930627 My stream: https://hestia.speckle.works/#/view/t8QJaSdlV Might be something wrong with my Speckle installation? Should I do a fresh install, or how do I debug SpeckleElementsRevit? Is that done by creating breakpoints and attach Visual Studio project to a running Revit instance?
Hey Long, see below:
I can also make a pre-release if it helps, it's just a bit slow building the installer...
I set breakpoint after beam's location is set. Revit 2020 started. I created a sender and sent to hestia. Sending was done with the same conversion errors. Over Visual Studio, it said "The breakpoint will not currently be hit. No symbols have been loaded for this document."
Do I have to somehow disable SpeckleElements in localappdata
?
That could be cause by:
Anyways, here's a pre-release of the installer for you to test with: https://github.com/speckleworks/SpeckleInstaller/releases/tag/1.8.23
LMK how it goes!
@teocomi I pulled before debugging
PS D:\speckle\SpeckleElements> git status
On branch master
Your branch is ahead of 'origin/master' by 6 commits.
(use "git push" to publish your local commits)
nothing to commit, working tree clean
PS D:\speckle\SpeckleElements> git fetch upstream
PS D:\speckle\SpeckleElements> git rebase upstream/master
Current branch master is up to date.
PS D:\speckle\SpeckleElements> git status
On branch master
Your branch is ahead of 'origin/master' by 6 commits.
(use "git push" to publish your local commits)
nothing to commit, working tree clean
PS D:\speckle\SpeckleElements>
Anyways, I tried latest SpeckleInstaller. All Structural Framings were sent successfully, no conversion error. But when I tried to send all elements in {3D} view, 7 elements failed. Here's my stream: https://hestia.speckle.works/#/streams/b_tOH9KE-/
Thanks, when you say "I tried to send all elements in {3D} view" did you add the elements via selection? If so I guess you might be selecting also something that is currently not supported...
I did not select elements. I selected a view instead. Failed elements did not have id, so I did not know what type of element they were.
On Tue, Jun 2, 2020, 21:10 Matteo Cominetti notifications@github.com wrote:
Thanks, when you say "I tried to send all elements in {3D} view" did you add the elements via selection? If so I guess you might be selecting also something that is currently not supported...
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/speckleworks/SpeckleElements/issues/28#issuecomment-637568478, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHDQVBDTS2TBZ3FU425DK3RUUB5JANCNFSM4LXUE5UQ .
Gotcha! It's probably just a matter for us to exclude those elements as they are probably not relevant... Thanks for reporting!
I mean failed elements did not have ID when I clicked the ...
button in Speckle window. Actually they are model elements because I could select them visually in {3D} view.
As github is the recommended place to go first for bugs, I would like to move my thread on discourse here.
I created a Sender from Revit to my SpeckleServer. After pushing elements, there are more than 10 percent of elements failed. I have uploaded materials here:
html
file: output of SpeckleUi window.txt
file: ids of failed items extracted from html file.rvt
file: there is a view namedSPECKLE FAILED
where I isolated failed items.I don't know where and how to start debugging this like a normal Revit addin. The source code (SpeckleRevit, SpeckleElements, SpeckeUi) depends on each other in such a big circle (sorry for my poor C# skill).
For specific items in my rvt file, they are of Structural Framing category. Two of them are In-Place models. I think this line of code might have raised an Exception and crashed the conversion routine for all normal (curve-based) beams after it in the queue.
After making PR #27, I realized that In-Place elements are not processed properly. So I propose that In-Place elements should be converted separately from standard elements, although they might be in the same Revit Category.