jake77777 Posted September 24, 2010 Share Posted September 24, 2010 Can someone write me a lisp that would use the quick select command using to select everything on layer STR-TXT using window select. I use this SO much at work and it would save a great deal of time. I've tried for 3 hours but I think this is beyond me. Thank you for any help! Quote Link to comment Share on other sites More sharing options...
Lt Dan's legs Posted September 24, 2010 Share Posted September 24, 2010 try (ssget '((8 . "STR-TXT"))) (defun c:test (/ ss) (if (setq ss (ssget '((8 . "STR-TXT")))) (command "_.copy" ss "" pause) (prompt "\nNo objects selected") ) (princ) ) Quote Link to comment Share on other sites More sharing options...
Tharwat Posted September 24, 2010 Share Posted September 24, 2010 I would prefer it this way . (sssetfirst nil '(ssget "_x" '((8 . "STR-TXT")))) Tharwat Quote Link to comment Share on other sites More sharing options...
ReMark Posted September 24, 2010 Share Posted September 24, 2010 I would prefer it this way . (sssetfirst nil '(ssget "_x" '((8 . "STR-TXT")))) And why is that? Just curious. Quote Link to comment Share on other sites More sharing options...
jake77777 Posted September 24, 2010 Author Share Posted September 24, 2010 SO CLOSE..IT RECOGNIZES THE STR-TEXT LAYER THOUGH IT'S TELLING ME HOW MANY ENTITIES THERE ARE WITHOUT ACTUALLY SELECTING THEM..THANKS LT. DAN.."I'M NOT A SMART MAN" (defun c:QS (/ SS) (ssget '((8 . "STR-TXT"))) (princ) ) Quote Link to comment Share on other sites More sharing options...
Lt Dan's legs Posted September 24, 2010 Share Posted September 24, 2010 what are you trying to accomplish with the objects? Quote Link to comment Share on other sites More sharing options...
jake77777 Posted September 24, 2010 Author Share Posted September 24, 2010 TRYING REMARK AND THARWAT313 CODE POPS UP bad argument type: lselsetp (SSGET "_x" (QUOTE ((8 . "STR-TXT")))); error: An error has occurred inside the *error* functionAutoCAD variable setting rejected: "cmdecho" nil DO I HAVE A SETTING WRONG..TRIED CMDECHO 1?? SORRY NEWB ON THE FORUMN Quote Link to comment Share on other sites More sharing options...
jake77777 Posted September 24, 2010 Author Share Posted September 24, 2010 I use the quick select layer all day long .. Just a basic quick select..layer..str-txt..this is just a starting point..hopefully i can evolve from here Quote Link to comment Share on other sites More sharing options...
Lt Dan's legs Posted September 24, 2010 Share Posted September 24, 2010 try this (defun c:test (/ ss) (if (setq ss (ssget '((8 . "STR-TXT")))) (command "_.copy" ss "" pause pause) (prompt "\nNo objects selected") ) (princ) ) does this work? updated! sorry about that. try again Quote Link to comment Share on other sites More sharing options...
BlackBox Posted September 24, 2010 Share Posted September 24, 2010 My two cents... (defun c:FOO (/ ss count) (if (setq ss (ssget "_x" '((8 . "STR-TXT")))) (progn (sssetfirst nil ss) (prompt (strcat "\n >> " (cond ((= 1 (setq count (sslength ss))) (strcat "1 Object")) ((< 1 count) (strcat (rtos count 2 0) " Objects"))) " Selected "))) (prompt "\n <!> No Objects Selected <!> ")) (princ)) Quote Link to comment Share on other sites More sharing options...
Tharwat Posted September 24, 2010 Share Posted September 24, 2010 I am sorry, it should not be with quote after nil. Here it goes (sssetfirst nil (ssget "_x" '((8 . "STR-TXT")))) Remark, this code would select all entities that included within Layer "STR-TXT" and the user would see the selection set in a dwg. Thanks Quote Link to comment Share on other sites More sharing options...
jake77777 Posted September 24, 2010 Author Share Posted September 24, 2010 That seems just to select all the selected entities...any other suggestions? Quote Link to comment Share on other sites More sharing options...
alanjt Posted September 24, 2010 Share Posted September 24, 2010 (defun c:Test (/ ss) (sssetfirst nil (setq ss (ssget '((8 . "STR-TXT"))))) (princ) ) Quote Link to comment Share on other sites More sharing options...
jake77777 Posted September 24, 2010 Author Share Posted September 24, 2010 Sorry! Lt dan that worked perfect! Thank you! Also for the entire drawing (which i'll definitely need) renderman's code worked great. Thank you so much! Wish i asked 3 hrs ago! Quote Link to comment Share on other sites More sharing options...
jake77777 Posted September 24, 2010 Author Share Posted September 24, 2010 Thank you too alanjt Quote Link to comment Share on other sites More sharing options...
Lt Dan's legs Posted September 24, 2010 Share Posted September 24, 2010 No problem! If you would like to learn autolisp visit: http://www.afralisp.net This is a good place to start 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.