; Rune Wold and Michael Puckett - modified
; e.g. usage (setq marker (ALE_LASTENT))
(defun ALE_LastEnt ( / EntNam OutVal)
(and
(setq OutVal (entlast))
(while (setq EntNam (entnext OutVal))
(setq OutVal EntNam)
)
)
OutVal
)
;
; E.g. to include also the reference entity:
; (command "MOVE" (ALE_SS-AFTER marker) marker "" ...)
;
(defun ALE_Ss-After (EntNam / EntNxt SelSet)
(cond
( (not EntNam) (ssget "_X") )
( (setq EntNxt (entnext EntNam))
(setq SelSet (ssadd EntNxt))
(while (setq EntNxt (entnext EntNxt))
(if (entget EntNxt) (ssadd EntNxt SelSet))
)
SelSet
)
)
)