@Intuos5 wrote:
... how to add it as an alias. .... Could someone lend me a hand to configure select last and select previous to have "sell" and "selp" as alias? ....
Aliases in the .pgp file are for native AutoCAD commands. For this, you would want to define little custom command names:
(defun C:SELL () (sssetfirst nil (ssget "_L")))
(defun C:SELP () (sssetfirst nil (ssget "_P")))
You could put those lines into your acaddoc.lsp file [make one if you don't have one, even if they are all that's in it, in a place where AutoCAD knows to look] and they'll be loaded and available in every drawing.
Those can be used "plain" at the command prompt to select/highlight/grip the appropriate thing(s) as pre-selection for use with a subsequently-invoked command, but they can also be used transparently, i.e. within a command that's asking for object selection, mixed in among other selection options, by typing them with an apostrophe prefix:
Command: MOVE
Select objects: {picked something other than the last object} 1 found
Select objects: 'SELL
(nil <Selection set: 174>)
1 found, 2 total
Select objects: {continue selecting things...}
....
[though in that kind of usage, a simple L or P will do the same, but you could put them into Tool Palette buttons if you find picking one of those preferable to typing a letter.]
Kent Cooper, AIA