Author Topic: How to use editor.SelectCrossingWindow?  (Read 8291 times)

0 Members and 1 Guest are viewing this topic.

teslaxx

  • Guest
Re: How to use editor.SelectCrossingWindow?
« Reply #15 on: January 12, 2011, 06:09:21 AM »
No, the GeometricExtents.MinPoint and GeometricExtents.MaxPoint did the trick. Thanks Jeff H

And Kerry.... probably if I would describe my problem  in detail , you would provide me a MUCH better solution. :) But don't worry, If don't get what I want, I will come back.  :evil:
Anw, I really thank you for you interest in my problem. :)

teslaxx

  • Guest
Re: How to use editor.SelectCrossingWindow?
« Reply #16 on: January 26, 2011, 06:48:47 AM »
I forgot about this problem....   :evil:
I tried something today, but it seems is not working like a thaught it would.
So... back to my question: :)

What is the fastest way to get the entities which intersect a specific object?

Possible Answers:
A1: Just looping all the objects in drawing and checking with IntersectWith() method.
Bad Idea, because it takes too long,espeally if I have a very large number of entities in my drawing.

A2: By using the method editor.SelectCrossingWindow().
In this case, I need to define the zone for the object I selected. So I used the GeometricExtents.MaxPoint and GeometricExtents.MinPoint, but it's not always working. Sometimes, I get the objects which intersect the selected object, but sometimes I don't. Maybe, the way I'm calling the method with MaxPoint and MinPoint...

So... what should I do in order to use the editor.SelectCrossingWindow in order to get consistent results?


Later Edit:
If I'm using this method, I don't get always all the entities which intersect my object:
Code: [Select]
  public static PromptSelectionResult SCW(Editor editor, Entity selectedEntity)
        {

            Point3d min = selectedEntity.GeometricExtents.MinPoint;
            Point3d max = selectedEntity.GeometricExtents.MaxPoint;
            PromptSelectionResult acSsPrompt = editor.SelectCrossingWindow(max, min);
            return acSsPrompt;
        }




« Last Edit: January 26, 2011, 07:08:42 AM by teslaxx »

kaefer

  • Guest
Re: How to use editor.SelectCrossingWindow?
« Reply #17 on: January 26, 2011, 07:42:39 AM »
If I'm using this method, I don't get always all the entities which intersect my object:
Code: [Select]
  public static PromptSelectionResult SCW(Editor editor, Entity selectedEntity)
        {

            Point3d min = selectedEntity.GeometricExtents.MinPoint;
            Point3d max = selectedEntity.GeometricExtents.MaxPoint;
            PromptSelectionResult acSsPrompt = editor.SelectCrossingWindow(max, min);
            return acSsPrompt;
        }

Try adjusting your current view so that those extends are visible inside it.

That was a big problem in the olden days when doing graphical selections in lisp.