Skip to content
This repository has been archived by the owner on Aug 28, 2021. It is now read-only.

Failed to convert items #28

Open
htlcnn opened this issue Mar 31, 2020 · 25 comments
Open

Failed to convert items #28

htlcnn opened this issue Mar 31, 2020 · 25 comments
Assignees

Comments

@htlcnn
Copy link
Contributor

htlcnn commented Mar 31, 2020

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 named SPECKLE 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.

@teocomi teocomi pinned this issue Mar 31, 2020
@teocomi teocomi unpinned this issue Mar 31, 2020
@teocomi
Copy link
Member

teocomi commented Mar 31, 2020

I'll have a look, we clearly need some docs on how to debug the revit client first!

@teocomi teocomi self-assigned this Mar 31, 2020
@teocomi
Copy link
Member

teocomi commented Mar 31, 2020

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:

  • clone SpeckleElements
  • rebuild the solution
  • start debugging SpeckleElementsRevit (it will launch Revit 2019, but you can change it to 2018 in the project properties > debug)
  • make sure you rebuild the solution before each debug as only SpeckleElements.csproj has the copy action to copy the kit

@htlcnn
Copy link
Contributor Author

htlcnn commented May 3, 2020

@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?

@teocomi
Copy link
Member

teocomi commented May 4, 2020

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!

@teocomi
Copy link
Member

teocomi commented May 12, 2020

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!

@htlcnn
Copy link
Contributor Author

htlcnn commented May 12, 2020

@teocomi Looks like they're all converted successfully. I'm waiting for the release to test in Revit. Thanks!

@teocomi
Copy link
Member

teocomi commented May 12, 2020

@htlcnn
Copy link
Contributor Author

htlcnn commented May 13, 2020

@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.

image

new stream ID on hestia: CeFAxt6Oh

I'm using Revit 2019's addin for my Revit 2018 version.

@teocomi
Copy link
Member

teocomi commented May 13, 2020

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?

image

@htlcnn
Copy link
Contributor Author

htlcnn commented May 13, 2020

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

@teocomi
Copy link
Member

teocomi commented May 13, 2020

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?

@htlcnn
Copy link
Contributor Author

htlcnn commented May 13, 2020

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.

@teocomi
Copy link
Member

teocomi commented May 15, 2020

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 :)

@teocomi
Copy link
Member

teocomi commented May 21, 2020

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.

SpeckleElementsRevit.zip

@htlcnn
Copy link
Contributor Author

htlcnn commented May 21, 2020

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 😢

@teocomi
Copy link
Member

teocomi commented May 21, 2020

Just replace the SpeckleElementsRevit.dll in %localappdata%\SpeckleKits\SpeckleElements :)

@htlcnn
Copy link
Contributor Author

htlcnn commented May 21, 2020

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
image
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?

@teocomi
Copy link
Member

teocomi commented May 21, 2020

Hey Long, see below:

image

I can also make a pre-release if it helps, it's just a bit slow building the installer...

@htlcnn
Copy link
Contributor Author

htlcnn commented May 22, 2020

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?

image

@teocomi
Copy link
Member

teocomi commented May 26, 2020

That could be cause by:

  • your code not matching the dll (have you pulled?)
  • me not including the .pdb filles in the zip

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!

@htlcnn
Copy link
Contributor Author

htlcnn commented May 29, 2020

@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-/

@teocomi
Copy link
Member

teocomi commented Jun 2, 2020

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...

@htlcnn
Copy link
Contributor Author

htlcnn commented Jun 2, 2020 via email

@teocomi
Copy link
Member

teocomi commented Jun 2, 2020

Gotcha! It's probably just a matter for us to exclude those elements as they are probably not relevant... Thanks for reporting!

@htlcnn
Copy link
Contributor Author

htlcnn commented Jun 2, 2020

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants