Editor.SelectCrossingWindow very slow

Editor.SelectCrossingWindow very slow

p.zagler
Participant Participant
432 Views
2 Replies
Message 1 of 3

Editor.SelectCrossingWindow very slow

p.zagler
Participant
Participant

I am calling Editor.SelectCrossingWindow approx 150 times using 150 different points.

In drawing "A" this operation takes ~ 60ms.

In drawing "B" the same operation takes ~ 10000ms.

 

My testing code in C# is very simple and just consists of these lines:

 

var ed = Application.DocumentManager.MdiActiveDocument.Editor;
var sw = Stopwatch.StartNew();
ed.SelectCrossingWindow(new Point3d(58743.2069510254, 150063.307978366, 0), new Point3d(58745.2069510254, 150065.307978366, 0));
....
ed.SelectCrossingWindow(new Point3d(79078.8718360285, 149684.868278114, 0), new Point3d(79080.8718360285, 149686.868278114, 0));
ed.WriteMessage($"Duration: {sw.ElapsedMilliseconds} ms");

 

Both drawings are zoomed out and the results of 'SelectCrossingWindow' calls  are the same for both. 

What is happening in drawing "B" to cause this huge difference?

 

Any help or hint is very welcome.

Thanks

Peter

0 Likes
Accepted solutions (1)
433 Views
2 Replies
Replies (2)
Message 2 of 3

hak_vz
Advisor
Advisor
Accepted solution

This request should be posted in .NET forum.

Miljenko Hatlak

EESignature

Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
0 Likes
Message 3 of 3

p.zagler
Participant
Participant

Thank you.
I have posted the request in the .NET forum.

https://forums.autodesk.com/t5/net/editor-selectcrossingwindow-very-slow/td-p/10651467

 

0 Likes