Selecting items and changing color

Discussion in 'AutoCAD' started by CLS, Jul 20, 2004.

  1. CLS

    CLS Guest

    Hi All,

    I am writing a LISP command to select all items in a file, and change the
    color to the layer color that they are on.

    I cannot find a command to "select all" nor can I figure out how to change
    to color of the selected items if I do it manually.

    Please help,
    Chad
     
    CLS, Jul 20, 2004
    #1
  2. CLS

    T.Willey Guest

    (setq ss (ssget "x"))<-- selects all objects in drawing and makes a selection set of them
    (command "_.change" ss "" "_p" "_c" "_bylayer" "")<-- here you use the change command to change the selection set properties, color, to bylayer.

    Tim
     
    T.Willey, Jul 21, 2004
    #2
  3. (if (setq SS (ssget "ALL"))
    (command "chprop" SS "" "Color" "Bylayer" "")
    )
     
    Alan Henderson @ A'cad Solutions, Jul 21, 2004
    #3
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.