jeremytammik / RevitLookup

Interactive Revit RFA and RVT project database exploration tool to view and navigate BIM element parameters, properties and relationships.
http://thebuildingcoder.typepad.com
MIT License
1.03k stars 294 forks source link

Unused code #120

Closed Nice3point closed 2 years ago

Nice3point commented 2 years ago

Hi, there is unused code and windows in the application. изображение изображение When opening Revit, there is a subscription to events if the subscription is already subscribed. This condition will never be met.

if (EventsForm.DocEvents.AreEventsEnabled) EventsForm.DocEvents.EnableEvents(args.Document);

If this code is already deprecated, I could remove it. This is still a database exploration add-in, not an example of event usage in Revit.

There are also empty files that do not contain anything. for example HostApplication.cs

jeremytammik commented 2 years ago

I believe there was once functionality included which enabled switching on and off the event monitoring. That could be useful to understand the API. It could actually also be a useful and valuable database exploration tool, because: if I perform a manual action in Revit and add a new object or remove an existing one, it may cause more than one new element to be affected. The DocumentChanged event enable tracking those via the added and removed lists. On the other hand, you are right, there are other tools that also enable this, e.g., the element lister, and it makes sense to keep things simple. So, I guess removing it will do no harm. Removing the empty filers definitely won't :-) Thank you for noticing and pointing it out!

Nice3point commented 2 years ago

I understand, but now this option is inactive and not used) That is why I asked the question, should this code be removed or left for the future?)

jeremytammik commented 2 years ago

I am completely happy to leave that decision up to you. My impression is that you would prefer to remove it? Correct? If so, that is absolutely fine by me. вялікі дзякуй!

Nice3point commented 2 years ago

Not a bad Belarusian speech) I will deal with this closer to the new year) There are also plans to rewrite the code from outdated WinForms to WPF, but this is after the transition of Revit to .Net 5+

jeremytammik commented 2 years ago

Cool! The transition will take a while, I'm afraid, but it is being discussed and planned, afaik.

Nice3point commented 2 years ago

discussed and planned.

As far as I understand, the 2023 version will still be on the Net Framework 4.8? No details?

jeremytammik commented 2 years ago

I have no idea. i know nothing about future versions. This is what i know so far:

https://thebuildingcoder.typepad.com/blog/2021/01/face-triangulation-lod-net-5-and-core.html#2

jeremytammik commented 2 years ago

i could ask for an update from the devteam. i you would like me to do that, please prompt me in the forum:

https://forums.autodesk.com/t5/revit-api-forum/does-revit-target-net-standard/m-p/9792894

Nice3point commented 2 years ago

Ok, thanks, I asked a question on the forum

jeremytammik commented 2 years ago

thank you, i see it. i'll pass on to the devteam.

Nice3point commented 2 years ago

@jeremytammik hi) can you turn off these checkboxes on the project page so as not to take up extra space? изображение

And also turn off Wiki, since it is not in use and turn on Discussions (Settings-Options-Features) изображение

jeremytammik commented 2 years ago

sure, glad to... done.

jeremytammik commented 2 years ago

wow, the description of the new release sounds impressive. noticeable speed improvements are not easy to come by! thank you!

Nice3point commented 2 years ago

noticeable speed improvements are not easy to come by

there is still the problem of boxing in object, but this is probably necessary. It takes a long time to rewrite on Generics and may not be realizable, i need to analyze the code that I did not write, this is not an easy task)