Closed ricaun closed 7 months ago
Unable to reproduce this issue https://github.com/jeremytammik/RevitLookup/assets/20504884/a79e9266-864f-4a79-8312-c10e8e1cfccf
@ricaun If you can, run the project in Debug mode and provide the name of the class, line number and method where the exception is thrown. You only show Revit in the video and I don't see VS there 🙈
Unable to reproduce this issue https://github.com/jeremytammik/RevitLookup/assets/20504884/a79e9266-864f-4a79-8312-c10e8e1cfccf
@ricaun If you can, run the project in Debug mode and provide the name of the class, line number and method where the exception is thrown. You only show Revit in the video and I don't see VS there 🙈
I was not running the RevitLookup project so that's why I didn't show the line...
Is something with the Revit Lookup Snoop Summary
and then Snoop Active Document
Gonna download and debug the RevitLookup project to check what is happening...
It's strange why item presenter doesn't find it. I'll take a closer look later)
I added.
if (itemsPresenter is null) return null;
Before line 102, kinda fixed.
Maybe my machine is slow or something... https://youtu.be/L74qMwW-QA8
It's more of a crutch, we need to find a more natural reason
I guess I found it! Disable smooth! (in your video smooth is enable)
With Smooth disabled, the TransitionDuration
is zero and in my machine, the FindVisualChild
makes itemsPresenter
to be null.
With Smooth enables itemsPresenter
is found normally.
The null
happens when you open the RevitLookup - Dashboard
and click on the Snoop summary
that is empty and then try to snoop an Active document
.
@ricaun I found the reason is that apparently the method is called twice. Here we need to either add one unsubscribe or change the logic and rewrite TreeSourceChanged. I will try to fix it this week
Thanks Luiz for raising it 😉
No problem 🤘
Now about another subject:
I was testing some way to another plugin to call the snoop navigation method to open the RevitLookup UI with any object. I manage to make work using reflection and looks like the SnoopService does not allow me to snoop class that is not from Revit or something.
Probably makes more sense to create a Discussion for this.
I found a Null Exception, only test in Revit 2024 with the last release 2024.0.8.
Steps:
Here is a video on how to do it: https://youtu.be/Exx5ra3Keqc
I get the exception below by opening Revit with debug: https://youtu.be/ICqYxJd7UH0