You could zoom to the area in question and then do your selection.
This will select objects that pass throught 0,0,0 even if they are not
zoomed on the screen.
{code}
[CommandMethod("Hittest")]
public static void Hit()
{
Editor ed = Application.DocumentManager.MdiActiveDocument.Editor;
//add reference to COM AutoCAD Type Library
((AcadApplication) Application.AcadApplication).ZoomWindow
(new double[] { -1, -1, -1 }, new double[] { 1, 1, 1 });
PromptSelectionResult psr =
ed.SelectCrossingWindow(new Point3d(0, 0, 0), new Point3d(0,0,0));
((AcadApplication)Application.AcadApplication).ZoomPrevious();
}
{code}
"HeNK" wrote in message
news:6233136@discussion.autodesk.com...
Yes, you're right, I did try the SelectCrossingWindow() now.
But I ran into two limitations of this function, due to using the
EditorInput I guess:
- If the crossingwindow is outside the screen, the function returns the
Status "Error".
- The count of ObjectIds found is dependent of the zoom factor.
(This functionality does not differ from behaviour in for example
Silverlight, which also uses the screen pixels for calculations)
I did hope a function would exist on database level (more reliable), but it
is understandable there isn't one.
Thanks,
Henk