<?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: Create layer and put select objects to the newly created layer. in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-and-put-select-objects-to-the-newly-created-layer/m-p/13106606#M7348</link>
    <description>&lt;P&gt;How would you know if an object is on this new layer *TBR? Should it be a different color, nd if so what would that be?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are all source layers the same color, or will the TBR layer need to change if say you answered RED above but the source layer is also red?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do the TBR need to have a special linetype? usually layers with content scheduled for removal may have a dashed line for example.&lt;BR /&gt;&lt;BR /&gt;Are what you selecting always a block? picking a leaf on a non-block 'tree' will only move the leaf to the new layer, not the entire tree, for example.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are your files created in Civil3D by chance?&lt;/P&gt;</description>
    <pubDate>Thu, 24 Oct 2024 19:58:29 GMT</pubDate>
    <dc:creator>pendean</dc:creator>
    <dc:date>2024-10-24T19:58:29Z</dc:date>
    <item>
      <title>Create layer and put select objects to the newly created layer.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-and-put-select-objects-to-the-newly-created-layer/m-p/13106528#M7346</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Does anyone have a lisp routine that creates layer from selected object, using the object's layer name but adding a suffix? Example of object layer name is TREE; created layer will be TREE-TBR. In addition, can the selected object be on the newly created layer? This could help a lot to speed up the topographic base drawing processing, isolate existing entities (to be removed) and put them on a separate layer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The request above might be a bit complicated, maybe a lisp routine to create a layer and put the selected objects to the newly created layer (C-SITE-TBR). If the layer already exists, just put the selected objects to this layer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope anyone could help me speed up things a little bit on our process. Thank you in advance.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Oct 2024 19:10:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-and-put-select-objects-to-the-newly-created-layer/m-p/13106528#M7346</guid>
      <dc:creator>Christian.mendoza2</dc:creator>
      <dc:date>2024-10-24T19:10:38Z</dc:date>
    </item>
    <item>
      <title>Re: Create layer and put select objects to the newly created layer.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-and-put-select-objects-to-the-newly-created-layer/m-p/13106566#M7347</link>
      <description>&lt;P&gt;Until then.create the Layer manually and set it current. Use LAYCUR to select objects to be moved to that layer/&lt;/P&gt;</description>
      <pubDate>Thu, 24 Oct 2024 19:34:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-and-put-select-objects-to-the-newly-created-layer/m-p/13106566#M7347</guid>
      <dc:creator>AllenJessup</dc:creator>
      <dc:date>2024-10-24T19:34:35Z</dc:date>
    </item>
    <item>
      <title>Re: Create layer and put select objects to the newly created layer.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-and-put-select-objects-to-the-newly-created-layer/m-p/13106606#M7348</link>
      <description>&lt;P&gt;How would you know if an object is on this new layer *TBR? Should it be a different color, nd if so what would that be?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are all source layers the same color, or will the TBR layer need to change if say you answered RED above but the source layer is also red?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do the TBR need to have a special linetype? usually layers with content scheduled for removal may have a dashed line for example.&lt;BR /&gt;&lt;BR /&gt;Are what you selecting always a block? picking a leaf on a non-block 'tree' will only move the leaf to the new layer, not the entire tree, for example.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are your files created in Civil3D by chance?&lt;/P&gt;</description>
      <pubDate>Thu, 24 Oct 2024 19:58:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-and-put-select-objects-to-the-newly-created-layer/m-p/13106606#M7348</guid>
      <dc:creator>pendean</dc:creator>
      <dc:date>2024-10-24T19:58:29Z</dc:date>
    </item>
    <item>
      <title>Re: Create layer and put select objects to the newly created layer.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-and-put-select-objects-to-the-newly-created-layer/m-p/13106654#M7349</link>
      <description>&lt;P&gt;TBR layers will be on a different color, to identify one from the other. Layer properties can be controlled by the layer state. The important thing is to have the object to that particular layer. Our files topographic drawings utilize civil 3d objects.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Oct 2024 20:21:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-and-put-select-objects-to-the-newly-created-layer/m-p/13106654#M7349</guid>
      <dc:creator>Christian.mendoza2</dc:creator>
      <dc:date>2024-10-24T20:21:36Z</dc:date>
    </item>
    <item>
      <title>Re: Create layer and put select objects to the newly created layer.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-and-put-select-objects-to-the-newly-created-layer/m-p/13106658#M7350</link>
      <description>&lt;P&gt;That's what we are doing at the moment, thank you.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Oct 2024 20:23:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-and-put-select-objects-to-the-newly-created-layer/m-p/13106658#M7350</guid>
      <dc:creator>Christian.mendoza2</dc:creator>
      <dc:date>2024-10-24T20:23:11Z</dc:date>
    </item>
    <item>
      <title>Re: Create layer and put select objects to the newly created layer.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-and-put-select-objects-to-the-newly-created-layer/m-p/13108837#M7351</link>
      <description>&lt;P&gt;Here's a little Lisp that will 'move' items to Layername that you input.&lt;/P&gt;&lt;P&gt;Makes the Layer (if not existing or if it exists already).&lt;/P&gt;&lt;P&gt;Selects objects to 'move' - changes properties of those objects to Layer Layername.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun C:MTL (); Move To Layer
 (setq olay (getvar 'clayer))
 (setq NL (getstring "\nTarget Layer Name ?"))
 (if NL
  (progn
   (princ (strcat "\nPick the Objects to move to " NL " Layer:"))
   (setq ss (ssget))
    (if ss
     (progn
      (command "_layer" "M" NL "")
      (command "_Change" ss "" "P" "LA" NL "")
      (setq Len (sslength ss))
      (prompt (strcat "\nMoved " (itoa Len) " Items to Layer " NL))
     ); progn
    ); if
   ); progn
  ); if
  (Command "_layer" "S" olay "")
  (princ)
 ); function
 (princ); silent load&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just appload it, or drag / drop into Acad.&lt;/P&gt;&lt;P&gt;Function call is MTL at command line.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ECCAD&lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2024 17:35:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-and-put-select-objects-to-the-newly-created-layer/m-p/13108837#M7351</guid>
      <dc:creator>ec-cad</dc:creator>
      <dc:date>2024-10-25T17:35:39Z</dc:date>
    </item>
    <item>
      <title>Re: Create layer and put select objects to the newly created layer.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-and-put-select-objects-to-the-newly-created-layer/m-p/13108890#M7352</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7239274"&gt;@Christian.mendoza2&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;SPAN&gt;.... a lisp routine to create a layer and put the selected objects to the newly created layer (C-SITE-TBR). If the layer already exists, just put the selected objects to this layer. ...&lt;/SPAN&gt;.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Is it to be assumed that you could select multiple objects that may be &lt;EM&gt;on different Layers&lt;/EM&gt;, and you want each one put on a -TBR Layer based on its own current Layer?&amp;nbsp; That is, in multiple selection you don't want everything selected to go to the &lt;EM&gt;same&lt;/EM&gt; Layer?&amp;nbsp; [Certainly possible, but it does mean processing the selection one object at a time.]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, presumably a routine should check that an object is &lt;EM&gt;not already on&lt;/EM&gt; a Layer with that ending, so that you don't end up eventually creating something like a "C-SITE-TBR-TBR-TBR" Layer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;[A routine could just create the new Layer and move the object into it, &lt;EM&gt;without&lt;/EM&gt; checking whether it's already in the drawing.&amp;nbsp; For a Layer command, it won't matter if it is.]&lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2024 18:04:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-and-put-select-objects-to-the-newly-created-layer/m-p/13108890#M7352</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2024-10-25T18:04:40Z</dc:date>
    </item>
    <item>
      <title>Re: Create layer and put select objects to the newly created layer.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-and-put-select-objects-to-the-newly-created-layer/m-p/13108902#M7353</link>
      <description>&lt;P&gt;I just tried this, and this is what I needed. Thank you very much ec-cad, appreciate it so much!&lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2024 18:12:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-and-put-select-objects-to-the-newly-created-layer/m-p/13108902#M7353</guid>
      <dc:creator>Christian.mendoza2</dc:creator>
      <dc:date>2024-10-25T18:12:02Z</dc:date>
    </item>
    <item>
      <title>Re: Create layer and put select objects to the newly created layer.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-and-put-select-objects-to-the-newly-created-layer/m-p/13109014#M7354</link>
      <description>&lt;P&gt;Hello Kent, I see your point regarding multiple replications. I was thinking selecting one object at a time only. I am pretty new with LISP, just starting to learn how it works. Thank you for your input on this.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2024 19:15:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-and-put-select-objects-to-the-newly-created-layer/m-p/13109014#M7354</guid>
      <dc:creator>Christian.mendoza2</dc:creator>
      <dc:date>2024-10-25T19:15:30Z</dc:date>
    </item>
    <item>
      <title>Re: Create layer and put select objects to the newly created layer.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-and-put-select-objects-to-the-newly-created-layer/m-p/13109116#M7355</link>
      <description>&lt;P&gt;Try this, which lets you select as many as you want [no need to pick them one at a time], but processes each separately as I described above, checking for whether each one is already on such a Layer, and unlike Message 6 does not require you to spell out the Layer name, nor put the entire selection on the same Layer.&amp;nbsp; Lightly tested.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;(defun C:MTBRL ; = Move to -TBR Layer
  (/ ss n ent elay)
  (if (setq ss (ssget "_:L")); anything on unlocked Layer(s)
    (repeat (setq n (sslength ss))
      (setq
        ent (ssname ss (setq n (1- n)))
        elay (cdr (assoc 8 (entget ent)))
      ); setq
      (if (not (wcmatch (strcase elay) "*-TBR")); not already on such a Layer
        (command ; then
          "_.layer" "_new" (strcat elay "-TBR") "" ; create it [not made current]; OK if it already exists
          "_.chprop" ent "" "_layer" (strcat elay "-TBR") ""
        ); command
      ); if [no else -- leave alone if already on such a Layer]
    ); repeat
  ); if
  (prin1)
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It could include a color option in the Layer command, if all your -TBR Layers would be of&amp;nbsp;&lt;EM&gt;the same&lt;/EM&gt; different color.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2024 20:10:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-and-put-select-objects-to-the-newly-created-layer/m-p/13109116#M7355</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2024-10-25T20:10:53Z</dc:date>
    </item>
    <item>
      <title>Re: Create layer and put select objects to the newly created layer.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-and-put-select-objects-to-the-newly-created-layer/m-p/13109151#M7356</link>
      <description>&lt;P&gt;Just ran the lisp, twice. Like you said, it did not create the TBR string. Appreciate the way you composed it, with the description; makes it easier to understand for us beginners. Thank you very much Kent!&lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2024 20:43:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-and-put-select-objects-to-the-newly-created-layer/m-p/13109151#M7356</guid>
      <dc:creator>Christian.mendoza2</dc:creator>
      <dc:date>2024-10-25T20:43:34Z</dc:date>
    </item>
    <item>
      <title>Re: Create layer and put select objects to the newly created layer.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-and-put-select-objects-to-the-newly-created-layer/m-p/13109252#M7357</link>
      <description>&lt;P&gt;You are very Welcome !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ECCAD&lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2024 21:46:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-and-put-select-objects-to-the-newly-created-layer/m-p/13109252#M7357</guid>
      <dc:creator>ec-cad</dc:creator>
      <dc:date>2024-10-25T21:46:12Z</dc:date>
    </item>
    <item>
      <title>Re: Create layer and put select objects to the newly created layer.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-and-put-select-objects-to-the-newly-created-layer/m-p/13110674#M7358</link>
      <description>&lt;P&gt;This sounds very much like import points with a tree description, PENZD, so read the description and put the point on correct layer, then can have multiple tree layers with correct block and correct layer. Second part is description has trunk and spread again this is handled by a dynamic block to show tree spread and trunk, 2 objects, visually at correct size.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am I correct ? Has been asked elsewhere here.&lt;/P&gt;</description>
      <pubDate>Sun, 27 Oct 2024 03:30:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-and-put-select-objects-to-the-newly-created-layer/m-p/13110674#M7358</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2024-10-27T03:30:20Z</dc:date>
    </item>
    <item>
      <title>Re: Create layer and put select objects to the newly created layer.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-and-put-select-objects-to-the-newly-created-layer/m-p/13113103#M7359</link>
      <description>&lt;P&gt;Sounds a great way to import Cogo points Sea-Haven. Unfortunately, we are referring to the design phase of topo processing, isolating objects to be removed (TBR) to another layer so I can freeze them on the improvement plans. Kent and ECCAD have sent the Lisp routines I needed.&lt;/P&gt;&lt;P&gt;Thank you, everyone for taking a look at this. This forum, definitely, is the best source of tools and information to make designing easy and efficient. Appreciate it very much!&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2024 15:03:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-and-put-select-objects-to-the-newly-created-layer/m-p/13113103#M7359</guid>
      <dc:creator>Christian.mendoza2</dc:creator>
      <dc:date>2024-10-28T15:03:03Z</dc:date>
    </item>
    <item>
      <title>Re: Create layer and put select objects to the newly created layer.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-and-put-select-objects-to-the-newly-created-layer/m-p/13148683#M7360</link>
      <description>&lt;P&gt;Hello Kent. Is there a way to tweak the lisp below to match the old object's linetype but the color will be 9? That way, I still can xref it on my plans and look the same, but faded? Hope you could help me on this, Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2024 18:56:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-and-put-select-objects-to-the-newly-created-layer/m-p/13148683#M7360</guid>
      <dc:creator>Christian.mendoza2</dc:creator>
      <dc:date>2024-11-13T18:56:21Z</dc:date>
    </item>
    <item>
      <title>Re: Create layer and put select objects to the newly created layer.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-and-put-select-objects-to-the-newly-created-layer/m-p/13148708#M7361</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7239274"&gt;@Christian.mendoza2&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;.... Is there a way to tweak the lisp below to match the old object's linetype but the color will be 9? ....&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;If by "the lisp below" you mean the accepted-solution code in Message 10, change line 12 in it to this:&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;"_.chprop" ent "" "_layer" (strcat elay "-TBR") "_color" 9 ""&lt;/LI-CODE&gt;
&lt;P&gt;But I'm not sure that's what you're after, because there's no "old object" or presumed "new object" to match to it.&amp;nbsp; It's still the same object, just put on a different Layer.&amp;nbsp; If I've misunderstood, explain in greater detail.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2024 19:09:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-and-put-select-objects-to-the-newly-created-layer/m-p/13148708#M7361</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2024-11-13T19:09:32Z</dc:date>
    </item>
    <item>
      <title>Re: Create layer and put select objects to the newly created layer.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-and-put-select-objects-to-the-newly-created-layer/m-p/13148772#M7362</link>
      <description>&lt;P&gt;Say I have an object on TREE layer. I want the object to be on TREE-TBR layer. TREE-TBR layer should match the linetype of TREE layer, but the color should be 9. This way, I can use it on polyliines amd lines on my ex. utility linewroks.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2024 19:46:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-and-put-select-objects-to-the-newly-created-layer/m-p/13148772#M7362</guid>
      <dc:creator>Christian.mendoza2</dc:creator>
      <dc:date>2024-11-13T19:46:13Z</dc:date>
    </item>
    <item>
      <title>Re: Create layer and put select objects to the newly created layer.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-and-put-select-objects-to-the-newly-created-layer/m-p/14035159#M170218</link>
      <description>&lt;P&gt;Thank you for your lisp code.&lt;/P&gt;&lt;P&gt;I just want to find out the following:&lt;/P&gt;&lt;P&gt;I already have the layers, each with different colours - as for contours - one layer for each contour with a different colour. The names of the layers are Contour 1797 for instance.&lt;/P&gt;&lt;P&gt;I only have polylines and one of the properties of these polylines is 'Elevation'&lt;/P&gt;&lt;P&gt;For each polyline, I wish to read its elevation and place it in the correct layer, whilst the polyline inherits the colour of that layer.&lt;/P&gt;&lt;P&gt;Is it possible that you can change your code in message 10 to accommodate this.&lt;/P&gt;&lt;P&gt;BTW .. you helped me some time ago with line types where I had to compile tracks from many lines like in a racetrack with hatching.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Peekay&lt;/P&gt;</description>
      <pubDate>Fri, 27 Feb 2026 09:53:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-and-put-select-objects-to-the-newly-created-layer/m-p/14035159#M170218</guid>
      <dc:creator>p_k_odendaal</dc:creator>
      <dc:date>2026-02-27T09:53:19Z</dc:date>
    </item>
    <item>
      <title>Re: Create layer and put select objects to the newly created layer.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-and-put-select-objects-to-the-newly-created-layer/m-p/14035521#M170221</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/18070930"&gt;@p_k_odendaal&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;SPAN&gt;....&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;I only have polylines and one of the properties of these polylines is 'Elevation'&lt;/P&gt;
&lt;P&gt;For each polyline, I wish to read its elevation and place it in the correct layer, whilst the polyline inherits the colour of that layer.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;....&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Do the Polylines ever have color property overrides?&amp;nbsp; If they might, they can be forced to be BYLAYER in color, but if they're always already BYLAYER, there's no need.&lt;/P&gt;
&lt;P&gt;Are the Elevation properties always &lt;EM&gt;whole-number&lt;/EM&gt; values?&amp;nbsp; They will be real numbers [i.e. with decimal], whether the decimal part is&lt;STRONG&gt; .&lt;/STRONG&gt;0 or otherwise [in terms of Elevation property, that can be anything].&amp;nbsp; They will need to be converted to integers and then into text strings for use in Layer names.&amp;nbsp; If one might be at, for example, Elevation 1797.475, what Layer should it go on?&lt;/P&gt;</description>
      <pubDate>Fri, 27 Feb 2026 13:15:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-and-put-select-objects-to-the-newly-created-layer/m-p/14035521#M170221</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2026-02-27T13:15:39Z</dc:date>
    </item>
    <item>
      <title>Re: Create layer and put select objects to the newly created layer.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-and-put-select-objects-to-the-newly-created-layer/m-p/14035556#M170222</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7239274"&gt;@Christian.mendoza2&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Say I have an object on TREE layer. I want the object to be on TREE-TBR layer. TREE-TBR layer should match the linetype of TREE layer, but the color should be 9. .....&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I didn't catch this one back then, but here's a late reply:&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;(defun C:MTBRL ; = Move to -TBR Layer
  (/ ss n ent elay lnew)
  (if (setq ss (ssget "_:L")); anything on unlocked Layer(s)
    (repeat (setq n (sslength ss))
      (setq
        ent (ssname ss (setq n (1- n)))
        elay (cdr (assoc 8 (entget ent)))
      ); setq
      (if (not (wcmatch (strcase elay) "*-TBR")); not already on such a Layer
        (command ; then
          "_.layer"
            "_new" (setq lnew (strcat elay "-TBR")); create it [not made current]; OK if it already exists
            "_color" 9 lnew
            "_ltype" (cdr (assoc 6 (tblsearch "layer" elay))) lnew
            ""
          "_.chprop" ent "" "_layer" (strcat elay "-TBR") "_color" "BYLAYER" ""
        ); command
      ); if [no else -- leave alone if already on such a Layer]
    ); repeat
  ); if
  (prin1)
)&lt;/LI-CODE&gt;
&lt;P&gt;[minimally tested]&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Feb 2026 13:28:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-and-put-select-objects-to-the-newly-created-layer/m-p/14035556#M170222</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2026-02-27T13:28:47Z</dc:date>
    </item>
  </channel>
</rss>

