pyrevitlabs / pyRevit

Rapid Application Development (RAD) Environment for Autodesk Revit®
http://wiki.pyrevitlabs.io
GNU General Public License v3.0
1.3k stars 333 forks source link

Show View Range #2061

Open thumDer opened 9 months ago

thumDer commented 9 months ago

I've started implementing @jmcouffin 's wish from linkedin, and I'll try to track the progress here.

MVP

Further directions

thumDer commented 9 months ago

Sneak Peek

63C235B8-5269-4ACA-8A41-FFE732134B38

jmcouffin commented 9 months ago

Nice. I feel it is a bit overkill Sorry to be the party killer :( I imagine this could be a simple output window with color code for each plan + height + base level to be descriptive of the display the scope box for outline is smart. could also be the bbox for the whole set of elements present in the active view.

thumDer commented 9 months ago

So you mean in the modeless window there should be information about which color shows which plane, right?

Unfortunately getting the outline of all elements present in the active view is not that simple, the easiest way is actually turning on the section box for that view, and getting it's extents. However I don't want to override user's section box if they already have one applied. But if it is turned off I can turn it on instead of asking for it.

What do you mean by being overkill? Which part?

jmcouffin commented 9 months ago

So you mean in the modeless window there should be information about which color shows which plane, right?

yes

Unfortunately getting the outline of all elements present in the active view is not that simple, the easiest way is actually turning on the section box for that view, and getting it's extents. However I don't want to override user's section box if they already have one applied. But if it is turned off I can turn it on instead of asking for it.

yep, I am with you. But i would still prefer using something like the levels extents in the 3D view.

What do you mean by being overkill? Which part?

Going to the trouble of making a modeless form.

thumDer commented 9 months ago

yep, I am with you. But i would still prefer using something like the levels extents in the 3D view.

Ok, that can work, I can get the levels 3D extents from it's bounding box. I will use that if there is no Section Box

Going to the trouble of making a modeless form.

It is not a trouble if done correctly, and it is already implemented so it is what it is. I see no other way to have the option to navigate the view and analyze the planes while showing the geometry, and also be able to turn it off when it is not needed. Only viable alternative would be the smartbutton, but I have no experience with it yet, so I postponed that solution to a later version if it feels better.

Thanks for the inputs by the way! It is good to have different perspectives.

jmcouffin commented 9 months ago

Thanks for the inputs by the way! It is good to have different perspectives.

Likewise.

you did not PR yet, right?

thumDer commented 9 months ago

Not yet, will do soon.

jmcouffin commented 6 months ago

Bump @thumDer

thumDer commented 6 months ago

I got overwhelmed by other work stuff, so I had to put this aside for a while, but it is not forgotten. I try to implement your additional requests this week, and make a draft PR for you to play with it! Sorry again, for taking this long.

jmcouffin commented 6 months ago

Sorry again, for taking this long

No worry. I am just trying to follow up and keep things going and alive

MohamedAsli commented 5 months ago

Hi guys, Thanks for implementing this ! I didn't want to open an issue as you're trying to get rid of the old ones, so found this is the best place for my request. I noticed that the command raises an ImportError for pre-2023 version as the SelectionChangedEventArgs class is only available form 2023 onward. Didn't dive into your code @thumDer , but I'm wondering if you could manage to make it work for the older versions without using this class. Thanks

jmcouffin commented 5 months ago

but I'm wondering if you could manage to make it work for the older versions without using this class.

thanks @MohamedAsli we discussed this here: https://github.com/pyrevitlabs/pyRevit/pull/2178 we won't support pre 2023 as it would require using an idling event which would probably cause more arm than anything.