@john.uhden wrote:
... If the "last" entity had subentities like attributes or vertices, then (entnext (entlast)) will return the ename of the subentity ....
There's no need to bother with all of that fishing around for the new objects, unless drawing order in the end result is critical. I would just leave the copy/copies where they are, and Align the same selection set that was copied:
(defun c:AlignCopy (/ ss el)
(if ss (ssget ":L"))
(command
"_.COPY" ss "" "_none" '(0 0 0) "_none" '(0 0 0)
"_.ALIGN" "_previous" ""
); command
); if
(princ)
); defun
However, @muhamed_ragab92, I don't understand the word "contentious" -- I suspect that's not the right English word for what you mean. Can you explain differently?
If you want to select objects to make a Copy and then just select something to Align with [by "wall" do you mean a wall object in an overlay program, or just a basic-AutoCAD Line representing one face of a wall, or...?], there will be two possible Alignments [different directions on the same object], and infinite possible alignment origin points along it, so it may not be possible to escape the need to pick several points in the Align command. A sample drawing or image with before and after conditions would help.
Kent Cooper, AIA