+ Reply to Thread
Page 2 of 2 FirstFirst 1 2
Results 11 to 15 of 15
  1. #11
    Forum Deity BlackBox's Avatar
    Using
    Civil 3D 2011
    Join Date
    Nov 2009
    Posts
    3,939

    Default

    Registered forum members do not see this ad.

    I agree completely that both FILTER and QSELECT are the most robust options, but given the specificity of the OP's request, for fun:

    SelectBySS
    Code:
    (defun c:SelectBySS (/ ss color)
      (if (and (princ "\nSelect object to select all by color: ")
               (setq ss
                      (ssget ":S:E" '((-4 . "<NOT") (62 . 256) (-4 . "NOT>")))
               )
               (setq color (cdr (assoc 62 (entget (ssname ss 0)))))
          )
        (sssetfirst nil (ssget "_x" (list (cons 62 color))))
        (prompt "\n** Nothing selected ** ")
      )
      (princ)
    )
    SelectByColor
    Code:
    (defun c:SelectByColor (/ color ss)
      (if (and (princ "\nSelect objects by color: ")
               (setq color (acad_colordlg (atoi (getvar 'cecolor)) T))
               (setq ss (ssget "_x" (list (cons 62 color))))
          )
        (sssetfirst nil ss)
        (prompt "\n** Nothing selected ** ")
      )
      (princ)
    )
    "Potential has a shelf life." - Margaret Atwood

  2. #12
    Senior Member khoshravan's Avatar
    Computer Details
    khoshravan's Computer Details
    Operating System:
    Windows 7
    Computer:
    Sony Vaio
    Using
    AutoCAD 2010
    Join Date
    Feb 2009
    Location
    Tabriz
    Posts
    422

    Default

    Quote Originally Posted by ReMark View Post
    So you downloaded the lisp routine and tried it out?

    The key was to search on TIP1046.lsp.
    I downloaded it but I didn't know it is a LISP routine.
    No I haven't used it and am not sure if I will, as I am not used to LISP.

  3. #13
    Forum Deity Dadgad's Avatar
    Using
    AutoCAD 2012
    Join Date
    Nov 2011
    Location
    At the confluence of worthlessness & invaluability
    Posts
    3,132

    Default

    Quote Originally Posted by khoshravan View Post
    I downloaded it but I didn't know it is a LISP routine.
    No I haven't used it and am not sure if I will, as I am not used to LISP.
    There is a world of difference between WRITING a lisp, and using one.
    You use lisp all the time, within the program now.
    The EXPRESS TOOLS are mostly lisp programs, which you run by clicking on an icon, or entering a shortcall for it.

    There is no reason to be gun-shy of USING them, they will save you lots of time and work.
    Click on this link to Lee Mac's explanation of how to use them.
    Once you have read the first two little bits you will understand how to do it, and use any lisp program.

    After you see how easy it is, and how incredibly useful they are, go back to Lee's site and take a look at all of his wonderful lisp programs which he very generously makes available for free download there.
    Thanks Lee!
    Volume and repetition do not validate opinions forged in the absence of thought.

  4. #14
    Senior Member khoshravan's Avatar
    Computer Details
    khoshravan's Computer Details
    Operating System:
    Windows 7
    Computer:
    Sony Vaio
    Using
    AutoCAD 2010
    Join Date
    Feb 2009
    Location
    Tabriz
    Posts
    422

    Default

    Quote Originally Posted by Dadgad View Post
    There is a world of difference between WRITING a lisp, and using one.
    You use lisp all the time, within the program now.
    The EXPRESS TOOLS are mostly lisp programs, which you run by clicking on an icon, or entering a shortcall for it.

    There is no reason to be gun-shy of USING them, they will save you lots of time and work.
    Click on this link to Lee Mac's explanation of how to use them.
    Once you have read the first two little bits you will understand how to do it, and use any lisp program.

    After you see how easy it is, and how incredibly useful they are, go back to Lee's site and take a look at all of his wonderful lisp programs which he very generously makes available for free download there.
    Thanks Lee!
    Dear Dadgad

    Thanks for your warm and supportive reply. You have encouraged me to go forward LISP. I am aware of its importance and benefit but I thought I am little old for studying it. But with your email I will definitely will dive into it.

    Thanks a lot.

    PS) This reply is one of the best replies I have ever got in this forum.

  5. #15
    Quantum Mechanic ReMark's Avatar
    Computer Details
    ReMark's Computer Details
    Operating System:
    Windows 7 Pro 64-bit
    Computer:
    Thinkmate
    Motherboard:
    Intel DX58SO2 LGA1366 X58
    CPU:
    Intel i7-960 Quad-core 3.20GHz 8MB cache
    RAM:
    12GB (3x4GB) PC3-106000 DDR3
    Graphics:
    nVidia Quadro 4000, 2GB GDDR5
    Primary Storage:
    150GB Velocipraptor 10,000 rpm
    Secondary Storage:
    none
    Monitor:
    Dell P24LLH - 24" wide screen LCD
    Discipline
    See details...
    ReMark's Discipline Details
    Occupation
    CAD Draftsman/Designer...chemical manufacturing.
    Discipline
    See details below.
    Details
    I work for a specialty chemical manufacturer. I do a little bit of everything from P&IDs to civil to architectural and structural.
    Using
    AutoCAD 2013
    Join Date
    Nov 2005
    Location
    Norwalk, CT USofA
    Posts
    33,038

    Default

    Registered forum members do not see this ad.

    You do not have to know how to write lisp to use it just as you do not have to know how an internal combustion engine works to drive a car.
    "I have only come here seeking knowledge. Things they wouldn't teach me of in college." The Police

    Eat brains...gain more knowledge!

Similar Threads

  1. AutoCAD Layout Background Color to Solid Black or Other Color
    By Between the Lines in forum AutoCAD RSS Feeds
    Replies: 0
    Last Post: 14th Jul 2010, 09:20 pm
  2. Select objects by color?
    By TWilliams in forum AutoCAD Drawing Management & Output
    Replies: 3
    Last Post: 1st Oct 2007, 08:05 pm
  3. Can you select CMYK color in AutoCAD 2005??
    By StykFacE in forum AutoCAD Drawing Management & Output
    Replies: 1
    Last Post: 7th Aug 2006, 07:01 pm
  4. LISP to select by color
    By Morokiane in forum AutoLISP, Visual LISP & DCL
    Replies: 2
    Last Post: 5th Nov 2005, 01:42 am

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts