When I said you should replace 'yourx' and 'youry' with the coordinates of the known insertion point, I meant literally replace, rather than set to variables and use those variable names. When using point lists in (ssget) filtering, you need to use plain values *without* variables, if they're in a plain unevaluated list with the apostrophe at the beginning, like this [changing the 10 to 11 as in another reply]:
(setq txtsel (ssget "X" '((0 . "TEXT") (11 0.0 0.0 0.0))))
or if you're setting variables that will need to be *evaluated*, you need to use the (list) command explicitly, like this:
(setq txtsel (ssget "X" (list '(0 . "TEXT") (list 11 yourx youry 0.0))))
[The '(0 . "TEXT") still gets the apostrophe, because that inner list doesn't need evaluation -- you know the expected values exactly.]
If you do it the latter way, you can easily throw in another evaluation, to get to yourx + 1:
(setq txtsel (ssget "X" (list '(0 . "TEXT") (list 11 (1+ yourx) youry 0.0))))
--
Kent Cooper
framednlv wrote:
....
How can I setq for (10 yourx youry 0.0) and how can I change it from yourx to yourx + 1
I tried:
(setq yourx 0.0)
(setq youry 0.0)
....
(setq txt
(if (setq txtsel (ssget "X" '((0 . "TEXT") (10 yourx youry 0.0))))
(cdr (assoc 1 (entget (ssname txtsel 0))))
","
); end if
); end setq
....
Kent Cooper, AIA