@LFM.VDC wrote:
....
I need to get the code Highlighted in red to run on as many entities as are selected, without being limited to how this code is written. Which right now limits me to three entities....
....
(addTextatpoint 2 (ssname sset 0) pnt)
(setq pnt(list Xcoord(- Ycoord Spacing)Zcoord))
(addTextAtpoint 2 (ssname sset 1) pnt)
(setq pnt(list Xcoord(- Ycoord (* Spacing 2)) Zcoord))
....
There are some things I don't quite understand, but it looks like you're trying to move down by an additional Spacing distance in the Y direction with each object. One way to do that would be to use an integer variable that can serve for both the index value of the item in the selection set and the multiplier for the Y-coordinate down-stepping, incrementing that position-and-multiplier variable as you go, something like:
(setq n 0); starting value
(repeat (sslength sset)
(addTextatpoint 2 (ssname sset n)
(list Xcoord (- Ycoord (* Spacing (setq n (1+ n)))) Zcoord)
); addT...
); repeat
The first time, it will find the index-0 item [the first one] in the selection set, and set the Y coordinate position down by [setting n one higher at that point] one Spacing, and the second time, with n having been raised by one, it will find the index-1 item [the second one] in the selection set, and set the Y coordinate position down by two Spacings, and so on.
Kent Cooper, AIA