Author Topic: Selection needs to be visible on screen?  (Read 2970 times)

0 Members and 1 Guest are viewing this topic.

Atook

  • Swamp Rat
  • Posts: 1029
  • AKA Tim
Selection needs to be visible on screen?
« on: November 17, 2006, 12:38:20 PM »
It seems that for objects to be selected in VB(A) that they need to be entirely visible on screen.

       objSetLaterals.SelectByPolygon acSelectionSetFence, arr3DVertices, FilterType, FilterData

In the previous code, I get only select entities that are entirely visible on screen. If I zoom extents before I run the code, I get all of the entities crossing the fence.

Is there a way to get all of the entities without having them visible on the screen?

If there's no way to do this with VB(A) I'm open to other methods. :)

ronjonp

  • Needs a day job
  • Posts: 7529
Re: Selection needs to be visible on screen?
« Reply #1 on: November 17, 2006, 01:09:48 PM »
As far as I know, it's a known issue with AutoCAD and I have not found a work-around. Lisp selection shows the same behavior.


'er where  :-)

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

LE

  • Guest
Re: Selection needs to be visible on screen?
« Reply #2 on: November 17, 2006, 01:48:23 PM »
It is possible, I did it in the looong past using logical filters, but for some reason cannot find any of my samples...

Here is a link to MASTER John Uhden (Hey John were are you?)

http://www.cadlantic.com/Freebies.htm

And look for the ssgetends.zip - I think it will give you an idea - if not, please ignore my post.  :-)

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: Selection needs to be visible on screen?
« Reply #3 on: November 18, 2006, 12:28:35 AM »
Using any selection method that requires a point to determine the boundary will result in a failed selection if the objects within the boundary are not currently visible on the screen. This includes objects that are on frozen and off layers, or that have had their visibility set to off. For those entities, you will need to select them using other methods such as selecting all objects in the drawing filtering for the ones you would like to grab.
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

Atook

  • Swamp Rat
  • Posts: 1029
  • AKA Tim
Re: Selection needs to be visible on screen?
« Reply #4 on: November 20, 2006, 05:12:09 PM »
Using any selection method that requires a point to determine the boundary will result in a failed selection if the objects within the boundary are not currently visible on the screen. This includes objects that are on frozen and off layers, or that have had their visibility set to off. For those entities, you will need to select them using other methods such as selecting all objects in the drawing filtering for the ones you would like to grab.

That's what I was worried about. *YUCK*

Thanks for the replies!

LE

  • Guest
Re: Selection needs to be visible on screen?
« Reply #5 on: November 20, 2006, 06:52:14 PM »
Included is not the best sample, but give it a try is in plane jane lisp hth

Steps:
1. define points P1 P2 as they are in the drawing
2. zoom window to the rectangular area
3. load and run the command TST
4. zoom to extents and call the command SELECT P

Code: [Select]
(defun c:tst  (/ ss)
  (if (and (setq ss (ssget "X"
   (list
     '(-4 . "<AND")
     '(0 . "LINE")
     '(-4 . "AND>")
     '(-4 . "<AND")
     '(-4 . ">,>,*")
     (cons 10 p1)
     '(-4 . "<,<,*")
     (cons 10 p2)
     '(-4 . "AND>"))))
   (> (sslength ss) 0))
    (print (sslength ss))))
« Last Edit: November 20, 2006, 06:53:27 PM by LE »