Jump to content

quick select lisp command please!


jake77777

Recommended Posts

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!

Link to comment
Share on other sites

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)
)

Link to comment
Share on other sites

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)

)

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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))

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...