- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I know what I need to achieve but the coding for it is a bit beyond me...
Is this code correct to make two selection sets of the coordinates of, all blocks "PRE", and all on layer "TEXT", and a third set of all the text items on layer "TEXT"?
(setq TRcoord (cdr (assoc 10 (entget (ssname (ssget "_X" '((2 . "PTRE"))) 0)))))
(setq TXTcoord (cdr (assoc 10 (entget (ssname (ssget "_X" '((8 . "TEXT"))) 0)))))
(setq TXTS (ssget "_X" '((8 . "TEXT"))))
If so, I then need to compare the first two selection sets, and make a fourth selection set out of the third one of all selections whose coordinates in the second set match any selection in the first set, then perform a subroutine (defun c:TREN) on each text string in the fourth set...
(when I say match, all the coordinates in the second set have an x value that match by +/-0.001, and have a y value of 0.07 less (+/-0.001) than the match in the first set (does this mean a fuzz factor is involved), and z values are all over the place, but it's only the x,y that I need to pass on to the subroutine.)
I hope that all makes sense. Not sure if I'm overcomplicating things... Any help appreciated. Thanks
Solved! Go to Solution.