Author Topic: ssget and zoom level  (Read 1936 times)

0 Members and 1 Guest are viewing this topic.

cuda

  • Mosquito
  • Posts: 3
ssget and zoom level
« on: August 12, 2018, 04:21:42 AM »
hi,
I'm using this code: (ssget "C" Pt1 Pt2 '((0 . "MText"))) to select a Mtext. Normally it works properly and a Mtext entity is selected as I expect. The problem is when I zoom out my drawing to a very very small size, the selection set that it returns has more than one Mtext and these Mtexts are not even inside of the crossing box by (Pt1 Pt2). Apparently, the return of ssget function with "C" mode is influenced by zoom level.
Does anybody know how to solve this problem?

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: ssget and zoom level
« Reply #1 on: August 12, 2018, 04:33:50 AM »
hi,
I'm using this code: (ssget "C" Pt1 Pt2 '((0 . "MText"))) to select a Mtext. Normally it works properly and a Mtext entity is selected as I expect. The problem is when I zoom out my drawing to a very very small size, the selection set that it returns has more than one Mtext and these Mtexts are not even inside of the crossing box by (Pt1 Pt2). Apparently, the return of ssget function with "C" mode is influenced by zoom level.
Does anybody know how to solve this problem?

Yes, graphical selection methods (Window/Crossing/Polygon/Fence etc.) are influenced by the current zoom level; I recall that the term 'pixel flooding' has been previously used to describe the method used by AutoCAD to obtain a selection via these methods, which would explain why the zoom level is a factor in the result.

To avoid issues using these methods, I would suggest zooming the drawing to a window just slightly larger than your selection window, to provide the best opportunity to obtain an accurate selection.

cuda

  • Mosquito
  • Posts: 3
Re: ssget and zoom level
« Reply #2 on: August 12, 2018, 09:17:18 PM »

Yes, graphical selection methods (Window/Crossing/Polygon/Fence etc.) are influenced by the current zoom level; I recall that the term 'pixel flooding' has been previously used to describe the method used by AutoCAD to obtain a selection via these methods, which would explain why the zoom level is a factor in the result.

To avoid issues using these methods, I would suggest zooming the drawing to a window just slightly larger than your selection window, to provide the best opportunity to obtain an accurate selection.

Thanks Lee, looks like there's no solution for this. I've changed the code to: (ssget "F" (list Pt1 Pt2) '((0 . "MText"))) and it works better than "C" mode or "W" mode.

Crank

  • Water Moccasin
  • Posts: 1503
Re: ssget and zoom level
« Reply #3 on: August 13, 2018, 03:24:12 AM »
Autodesk should solve this, but I'm afraid that will never happen.

If it's really important to you, you can make a work around for this bug:
Select all MTEXT and compare their bounding boxes with your (virtual) crossing to get the selection set.
Vault Professional 2023     +     AEC Collection