hibba Posted December 28, 2015 Share Posted December 28, 2015 Hello guys, i need lisp for selecting objects previous to previous. for example if i move objects multi types with different selection, is there a lisp (or command) that will let me cycle back more than 1 previous selection set (a history of 5 would be good/better than 1. thanks and regards Quote Link to comment Share on other sites More sharing options...
ymg3 Posted December 29, 2015 Share Posted December 29, 2015 (edited) hibba, Not a lisp but rather lisp on the fly. Assign your selection set to variables as you do the selection. When in a command and prompted for a selection set, Typer: (setq ss1 (ssget)) you will then be re-prompted to select the objects. However the set will be saved in variable ss1 once you complete the selection. To re-use set ss1 that you just created as an input a slection prompt in another command, you simply type: !ss1 Note the preceding Exclamation Mark. You can use any variable names instead of ss1. Bear in mind that there is a limit on how many selection set can be kept. Not sure of that limit but I kind of remember 128 sets. ymg Edited December 29, 2015 by ymg3 Quote Link to comment Share on other sites More sharing options...
BIGAL Posted December 29, 2015 Share Posted December 29, 2015 A bit more (setq sel1 (ssget "P")) select previous. Maybe try making a list of the selection set so can use the sel1 repeatedly basicly have as many as you want !sels ( ) 3 selections (nth 0 sels) this was first selection set picked Quote Link to comment Share on other sites More sharing options...
hibba Posted December 29, 2015 Author Share Posted December 29, 2015 hello gentle man, i tried but i didn't get the exactly. anyways it will be appreciated if someone create a tutorial and post here so that will be easy to understand. Quote Link to comment Share on other sites More sharing options...
hibba Posted December 29, 2015 Author Share Posted December 29, 2015 Hello, Sorry for the previous reply, actually i forgot to type the "!" before ss1. This procedure is also good but i have to save all selection first, after that will work.. if someone create or provide any Lisp for the last five selection so that will be better rather than selecting objects and save with different shortcuts. thanks Quote Link to comment Share on other sites More sharing options...
rashidsohail13 Posted December 29, 2015 Share Posted December 29, 2015 its good work. but when command prompted and (p) Enter for previous selection for go more previous cycle selection need easy and short way. because over work small and no wand to save selection many time. please give a salutation or LISP. thanks & regards Quote Link to comment Share on other sites More sharing options...
BIGAL Posted December 30, 2015 Share Posted December 30, 2015 This will build a list of selection sets use (nth x sels) (defun C:grabss ( / ss1) (setq ss1 (ssget "P")) (setq sels (cons ss1 sels)) (alert (strcat (rtos (length sels) 2 0) " selection sets") ) ) Quote Link to comment Share on other sites More sharing options...
rashidsohail13 Posted January 10, 2016 Share Posted January 10, 2016 thanks for reply. i used this LSP and with the help of this LSP i have created 10 different sets of selections. But i don't know which command will be applied for previous selection. and what the meaning of (nth x sels). again thanks. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted January 11, 2016 Share Posted January 11, 2016 (nth x sels) = ( ) 3 selection sets but only 1 lisp it keeps adding the list of selection sets as you make them The nth command is just that find the objects within the LIST that matches the item number so if you had 3 like above (nth 0 sels) = (nth 1 sels) = (nth 2 sels) = (setq sels nil) will blank the selection set so you can start again. an example move !(nth 1 sels) this will find selection set note the ! required to work Quote Link to comment Share on other sites More sharing options...
tombu Posted January 12, 2016 Share Posted January 12, 2016 http://forums.augi.com/showthread.php?81175-select-result-lisp-modification#5 Is what I've been using. Modify $Result-Length to the number of previous sets of entities to save. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.