Jump to content

Recommended Posts

Posted

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!

Posted

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

Posted

I would prefer it this way .

 

(sssetfirst nil '(ssget "_x" '((8 . "STR-TXT"))))

 

Tharwat

Posted
I would prefer it this way .

 

(sssetfirst nil '(ssget "_x" '((8 . "STR-TXT"))))

 

 

And why is that? Just curious.

Posted

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)

)

Posted

what are you trying to accomplish with the objects?

Posted

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

Posted

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

Posted

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

Posted

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

Posted

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

Posted

That seems just to select all the selected entities...any other suggestions?

Posted
(defun c:Test (/ ss)
 (sssetfirst nil (setq ss (ssget '((8 . "STR-TXT")))))
 (princ)
)

Posted

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!

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