Closed andydandy74 closed 1 year ago
Hi @andydandy74 , I did experience some of that trouble too. Thank you very much for the improvement suggestion, I will try it out and publish it ASAP.
Hi Andreas, I am doing some package updating and I wanted to seize the opportunity to implement your code. But I noticed that the element is almost always "hilighted" in the general 3D view. Does it behave the same on your side?
Sorry for not replying earlier. In my experience this command will basically take the easiest path. If the object is "visible" in the active view (i.e. within the scope of the active view which doesn't necessarily mean that it may not be occluded by other objects) the active view will be used. So yeah, it might not always be ideal. If you're not happy with this approach, I could think of an alternative for 2D elements, though: Check if the element has an OwnerView attribute and if that attribute isn't null use the OwnerView. That would be far less computationally heavy for 2D elements at least.
Okay well I did multiple researches and couldn't find anything better .. I'm implementing your suggestion thanks a lot Andreas!! :) (done in version 2019.2.7 of the package)
Hi Mostafa, I recently used a ListView to display a list of annotation elements on a fairly large project and noticed that it took MultiInputForm a looong time to find an appropriate view. Is there any particular reason you're not using the
UIDocument.ShowElements
method? http://www.revitapidocs.com/2018.1/52ac2a55-1397-3d05-311f-de3443421ae6.htm Using it, I can reducesetviewforelement
to this:This seems to vastly improve performance on my end.