<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Select by color and then change to layer in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/select-by-color-and-then-change-to-layer/m-p/11739137#M34609</link>
    <description>&lt;P&gt;That's right &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;, its getting both. I read this idea on the forum and get it for this case.&lt;/P&gt;&lt;P&gt;By the way, sorry for misreferencing the script.&lt;/P&gt;</description>
    <pubDate>Wed, 08 Feb 2023 11:22:59 GMT</pubDate>
    <dc:creator>renanemeyer</dc:creator>
    <dc:date>2023-02-08T11:22:59Z</dc:date>
    <item>
      <title>Select by color and then change to layer</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/select-by-color-and-then-change-to-layer/m-p/11733627#M34600</link>
      <description>&lt;P&gt;Hello everyone on the forum. I've been reading several posts like this one:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/object-selection-with-color/td-p/8503973" target="_blank"&gt;https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/object-selection-with-color/td-p/8503973&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/select-all-layers-of-a-particular-color-and-send-to-back/td-p/9534694" target="_blank"&gt;https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/select-all-layers-of-a-particular-color-and-send-to-back/td-p/9534694&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In case I'm having trouble creating something similar. I would like a command that would select everything I have in color &lt;STRONG&gt;7&lt;/STRONG&gt; and set it on the layer "LAY-W".&lt;BR /&gt;Does anyone know how to proceed with the modification for this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2023 16:58:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/select-by-color-and-then-change-to-layer/m-p/11733627#M34600</guid>
      <dc:creator>renanemeyer</dc:creator>
      <dc:date>2023-02-06T16:58:03Z</dc:date>
    </item>
    <item>
      <title>Re: Select by color and then change to layer</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/select-by-color-and-then-change-to-layer/m-p/11733775#M34601</link>
      <description>&lt;P&gt;Do you mean only things with color 7 assigned &lt;EM&gt;as a property override&lt;/EM&gt;, or including things whose color is &lt;EM&gt;ByLayer&lt;/EM&gt; but which are on &lt;EM&gt;Layers&lt;/EM&gt; whose color is 7?&lt;/P&gt;
&lt;P&gt;And do you mean all such things in the drawing, or only from among a User selection?&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2023 17:44:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/select-by-color-and-then-change-to-layer/m-p/11733775#M34601</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2023-02-06T17:44:19Z</dc:date>
    </item>
    <item>
      <title>Re: Select by color and then change to layer</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/select-by-color-and-then-change-to-layer/m-p/11733862#M34602</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;Thanks for the answer!!&lt;BR /&gt;&lt;BR /&gt;Yes, only things with color 7 assigned as a property override and it would be all such things in the drawing, not needing to do the selection of what would change.&lt;BR /&gt;In this case, would you know how it could be modified?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2023 18:15:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/select-by-color-and-then-change-to-layer/m-p/11733862#M34602</guid>
      <dc:creator>renanemeyer</dc:creator>
      <dc:date>2023-02-06T18:15:30Z</dc:date>
    </item>
    <item>
      <title>Re: Select by color and then change to layer</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/select-by-color-and-then-change-to-layer/m-p/11733936#M34603</link>
      <description>&lt;P&gt;would you share the code you have so far?&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2023 18:47:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/select-by-color-and-then-change-to-layer/m-p/11733936#M34603</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2023-02-06T18:47:51Z</dc:date>
    </item>
    <item>
      <title>Re: Select by color and then change to layer</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/select-by-color-and-then-change-to-layer/m-p/11733977#M34604</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5143450"&gt;@renanemeyer&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;.... only things with color 7 assigned as a property override and it would be all such things in the drawing....&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Follow-up question:&amp;nbsp; Would they ever be in multiple different spaces?&amp;nbsp; If they're always only in Model space, it's rather simple to make something find all of them and collectively change their Layer with a CHPROP command.&amp;nbsp; But that won't do it if some are in different Paper space layouts, etc., in which case it can be done, but takes a different approach.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2023 19:01:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/select-by-color-and-then-change-to-layer/m-p/11733977#M34604</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2023-02-06T19:01:54Z</dc:date>
    </item>
    <item>
      <title>Re: Select by color and then change to layer</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/select-by-color-and-then-change-to-layer/m-p/11734028#M34605</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;&amp;nbsp;in this case it would only be for only in the Model space. An idea you commented I think it would work then.&lt;BR /&gt;In this case, I create a ss1 variable filtering these elements by color and apply "command "chprop" ss1 "" "LAY-W" ?&lt;BR /&gt;I'm visualizing this mentally, but I can't make a code that works in this case&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2023 19:25:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/select-by-color-and-then-change-to-layer/m-p/11734028#M34605</guid>
      <dc:creator>renanemeyer</dc:creator>
      <dc:date>2023-02-06T19:25:02Z</dc:date>
    </item>
    <item>
      <title>Re: Select by color and then change to layer</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/select-by-color-and-then-change-to-layer/m-p/11734042#M34606</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5143450"&gt;@renanemeyer&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;.... I create a ss1 variable filtering these elements by color and apply "command "chprop" ss1 "" "LAY-W" ? ....&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Yes.&amp;nbsp; But you need to &lt;EM&gt;call for the "_layer" option&lt;/EM&gt;&amp;nbsp;[i.e. which Property you want to change] before giving it the Layer name.&amp;nbsp; [Do it manually, and note the exact sequence of prompts and required inputs.]&amp;nbsp; And remember that the CHPROP will need an extra "" {Enter} at the end to tell it you're done [you &lt;EM&gt;could&lt;/EM&gt; go on to change other Properties within the same command, so you need to let it know].&lt;/P&gt;
&lt;P&gt;Try writing it, and if you can't make it work, show us what you came up with.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2023 19:33:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/select-by-color-and-then-change-to-layer/m-p/11734042#M34606</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2023-02-06T19:33:58Z</dc:date>
    </item>
    <item>
      <title>Re: Select by color and then change to layer</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/select-by-color-and-then-change-to-layer/m-p/11737299#M34607</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;&amp;nbsp;Thank you for the tips! Its&amp;nbsp;was accurate&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1137264"&gt;@paullimapa&lt;/a&gt;&amp;nbsp;thank you for your availability, I only managed to write now&lt;BR /&gt;I managed to do the lisp again now and it worked!! Below is the script:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun c:LAYW ( / c d e l )
   (if (setq e (car (entsel)))
       (progn
           (setq c
               (cond
                   (   (cdr (assoc 62 (entget e)))   )
                   (   (abs (cdr (assoc 62 (tblsearch "LAYER" (cdr (assoc 8 (entget 

e)))))))   )
               )
           )                     
           (while (setq d (tblnext "LAYER" (null d)))
               (if (= c (abs (cdr (assoc 62 d))))
                   (setq l (cons "," (cons (cdr (assoc 2 d)) l)))
               )
           )
           (sssetfirst nil
               (ssget "_X"
                   (if l
                       (list
                           (cons -4 "&amp;lt;OR")
                               (cons 62 c)
                               (cons -4 "&amp;lt;AND")
                                   (cons 62 256)
                                   (cons 8 (apply 'strcat (cdr l)))
                               (cons -4 "AND&amp;gt;")
                           (cons -4 "OR&amp;gt;")
                       )
                       (list (cons 62 c))
                   )
               )
           )
       )
   )
	(command "_.chprop" (ssget ) "" "LA" "LAY-W" "")
   (princ)
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2023 19:11:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/select-by-color-and-then-change-to-layer/m-p/11737299#M34607</guid>
      <dc:creator>renanemeyer</dc:creator>
      <dc:date>2023-02-07T19:11:10Z</dc:date>
    </item>
    <item>
      <title>Re: Select by color and then change to layer</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/select-by-color-and-then-change-to-layer/m-p/11737424#M34608</link>
      <description>&lt;P&gt;That looks like it contradicts Message 3, in that it gets &lt;EM&gt;both&lt;/EM&gt; things with the color as a property override &lt;EM&gt;and&lt;/EM&gt; those of ByLayer color on Layers with that color.&amp;nbsp; Am I misunderstanding?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;[And by the way, that's not a Script.&amp;nbsp; That word has a specific, and although related, &lt;EM&gt;different&lt;/EM&gt; meaning in AutoCAD.]&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2023 19:42:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/select-by-color-and-then-change-to-layer/m-p/11737424#M34608</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2023-02-07T19:42:56Z</dc:date>
    </item>
    <item>
      <title>Re: Select by color and then change to layer</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/select-by-color-and-then-change-to-layer/m-p/11739137#M34609</link>
      <description>&lt;P&gt;That's right &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;, its getting both. I read this idea on the forum and get it for this case.&lt;/P&gt;&lt;P&gt;By the way, sorry for misreferencing the script.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2023 11:22:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/select-by-color-and-then-change-to-layer/m-p/11739137#M34609</guid>
      <dc:creator>renanemeyer</dc:creator>
      <dc:date>2023-02-08T11:22:59Z</dc:date>
    </item>
  </channel>
</rss>

