@dbroad wrote:
Glad you found what you need. Even though ctype includes points and blocks, however, it will never find them. It does find them. I wonder why you say this. Have I missed something?
As far as optimization goes, the selection might be faster if you put the layer and object type filters first but narrow the object type filter to *text. Thanks for that, i didn't know how to arrange filters for optimization.
In addition, "=" is a very unforgiving attribute. You are right, there is no fuzz allowed. You need to know exactly its position first. In my case, my goal was to find the text by pre-selecting a block, another text or a point at the same exact location.
Also, its only going to find a single text entity since you've narrowed the window to a single point. Well, from what i tested, a (ssget "A" or "X"...) will find all entities respecting the filters. Multiple objects can have the same exact insertion points and thus will be found...
I would've preferred to use (ssget ":S+." (list '(0 . "*text")(cons 8 clayer) pollsibly followed by either (cons 10 einspt2d)) or
(cons -4 "<XOR")
(cons -4 "<AND") (cons 0 "*TEXT") (cons -4 "=,=,*") (cons 11 eInsPt2D)
(cons -4 "/=") (cons 72 0) (cons -4 "/=") (cons 73 0) (cons -4 "AND>")
(cons -4 "<AND") (cons -4 "=,=,*") (cons 10 eInsPt2D) (cons -4 "AND>")
(cons -4 "XOR>")
)) if you really need it. As long as the text entity is on the screen, it should find the text entity with either the 10 or 11 code. I'd have to test it a lot to be sure though. "=" eliminates the forgiveness of the pickbox. Again, my solution using (ssget "A" ...) would find them all, even not in the screen.
After reading the original post, he was clearly looking for a «non-specific point»... so yes, my solution should be adjusted topermit this by adding even more position filters as the equivalent of a crossing window. (just like the code in your first post).