<?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: A better method for changing xref layers in current drawing? in AutoCAD Forum</title>
    <link>https://forums.autodesk.com/t5/autocad-forum/a-better-method-for-changing-xref-layers-in-current-drawing/m-p/6431395#M270157</link>
    <description>&lt;P&gt;I gave that a shot and it does not appear to work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is how the command works out&lt;/P&gt;&lt;P&gt;Command: nc&lt;BR /&gt;Select nested entity:&lt;FONT color="#FF0000"&gt;(this is where I picked an xref layer)&lt;/FONT&gt; ; error: AutoCAD variable setting rejected: CLAYER "xref-layer-name"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 12 Jul 2016 14:03:41 GMT</pubDate>
    <dc:creator>claimed4all</dc:creator>
    <dc:date>2016-07-12T14:03:41Z</dc:date>
    <item>
      <title>A better method for changing xref layers in current drawing?</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/a-better-method-for-changing-xref-layers-in-current-drawing/m-p/6431330#M270155</link>
      <description>&lt;P&gt;We are currently using Civil3D 2016.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Some of my Parent Drawings may have 5-6 xrefs with about 500-1,000 layers per drawing.&amp;nbsp; So I can easily have a drawing with 4,000 layers.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sometimes I need to make an xrefed layer looking different in my parent drawing.&amp;nbsp; My Current method in my parent drawing is:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;'-xlist' command and select the object I want to change&lt;/LI&gt;&lt;LI&gt;Hit F2 to expand my command line and then copy and paste the entire layer name, including the xref prefix&lt;/LI&gt;&lt;LI&gt;Open my layer manager and paste the layer name in the search bar&lt;/LI&gt;&lt;LI&gt;Change the layer properties&lt;/LI&gt;&lt;LI&gt;Then '-xlist' the next layer I want to change&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sometimes I need to change 20-30 very random items and was wondering if there was a faster way, be it a built in command, lisp, add-in.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I would love would be a command to run where I pick a layer and I get a pop up dialog of the layer options (color/LW/LT...)&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2016 13:39:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/a-better-method-for-changing-xref-layers-in-current-drawing/m-p/6431330#M270155</guid>
      <dc:creator>claimed4all</dc:creator>
      <dc:date>2016-07-12T13:39:19Z</dc:date>
    </item>
    <item>
      <title>Re: A better method for changing xref layers in current drawing?</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/a-better-method-for-changing-xref-layers-in-current-drawing/m-p/6431358#M270156</link>
      <description>&lt;P&gt;You can use this simple lisp (or rewrite it to macro) to make a current layer by picking nested entity. Command is NC.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(defun c:NC () (setvar 'CLAYER (cdr (assoc 8 (entget (car (nentsel "\nSelect nested entity: ")))))) (princ))&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2016 13:50:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/a-better-method-for-changing-xref-layers-in-current-drawing/m-p/6431358#M270156</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2016-07-12T13:50:03Z</dc:date>
    </item>
    <item>
      <title>Re: A better method for changing xref layers in current drawing?</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/a-better-method-for-changing-xref-layers-in-current-drawing/m-p/6431395#M270157</link>
      <description>&lt;P&gt;I gave that a shot and it does not appear to work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is how the command works out&lt;/P&gt;&lt;P&gt;Command: nc&lt;BR /&gt;Select nested entity:&lt;FONT color="#FF0000"&gt;(this is where I picked an xref layer)&lt;/FONT&gt; ; error: AutoCAD variable setting rejected: CLAYER "xref-layer-name"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2016 14:03:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/a-better-method-for-changing-xref-layers-in-current-drawing/m-p/6431395#M270157</guid>
      <dc:creator>claimed4all</dc:creator>
      <dc:date>2016-07-12T14:03:41Z</dc:date>
    </item>
    <item>
      <title>Re: A better method for changing xref layers in current drawing?</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/a-better-method-for-changing-xref-layers-in-current-drawing/m-p/6431402#M270158</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1779365"&gt;@ВeekeeCZ&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;....&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(defun c:NC () (setvar 'CLAYER (cdr (assoc 8 (entget (car (nentsel "\nSelect nested entity: ")))))) (princ))&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;In my older version [2004] where I am at the moment, that doesn't work -- it won't let you&amp;nbsp;make an Xref-dependent Layer current. &amp;nbsp;[It works for nested entities in ordinary &lt;EM&gt;Blocks&lt;/EM&gt;, but not in Xrefs.] &amp;nbsp;Does it actually work in newer versions?&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2016 14:06:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/a-better-method-for-changing-xref-layers-in-current-drawing/m-p/6431402#M270158</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2016-07-12T14:06:37Z</dc:date>
    </item>
    <item>
      <title>Re: A better method for changing xref layers in current drawing?</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/a-better-method-for-changing-xref-layers-in-current-drawing/m-p/6431413#M270159</link>
      <description>&lt;P&gt;Sorry guys, my bad.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But here is a different idea - tmp layer filter. Pick how many entities you want, then go to the layer manager.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(defun c:tmplf ( / en lays) ; tmp layer filter

  (setq lays "")
  (while (setq en (nentsel "\nSelect nested layer: "))
    (setq lays (strcat (princ (cdr (assoc 8 (entget (car en))))) "," lays)))
  (if (/= lays "")
    (command "_.-LAYER" "_FILTER" "_Delete" "tmp" ""
	     "_.-LAYER" "_FILTER" "_New" "_Group" "" lays "tmp" ""))
  (princ)
)&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper﻿&lt;/a&gt;&amp;nbsp;You're right. I was suspicious, but I tested it on block accidentally, I thought it was a xref.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2016 14:13:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/a-better-method-for-changing-xref-layers-in-current-drawing/m-p/6431413#M270159</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2016-07-12T14:13:46Z</dc:date>
    </item>
    <item>
      <title>Re: A better method for changing xref layers in current drawing?</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/a-better-method-for-changing-xref-layers-in-current-drawing/m-p/6431442#M270160</link>
      <description>&lt;P&gt;Another approach you could consider:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Get the nested Layer name with a modification of BeekeeCZ's first suggestion:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;(defun c:GNL ()&lt;/P&gt;
&lt;P&gt;&amp;nbsp; (setq &lt;FONT color="#0000FF"&gt;layname&lt;/FONT&gt; (cdr (assoc 8 (entget (car (nentsel "\nSelect nested entity: "))))))&lt;/P&gt;
&lt;P&gt;&amp;nbsp; (princ)&lt;/P&gt;
&lt;P&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then, though for some reason a Command-line manual Layer command won't accept the typical use-what's-in-a-variable thing with the preceding exclamation point:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;!&lt;FONT color="#0000FF"&gt;layname&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;as a Layer name in&amp;nbsp;a property-assignment option, it &lt;EM&gt;can&lt;/EM&gt; be done with an AutoLisp Layer command using that variable:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;(command "_.layer" "_color" &lt;FONT color="#00CCFF"&gt;123&lt;/FONT&gt; &lt;FONT color="#0000FF"&gt;layname&lt;/FONT&gt; "")&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That could be automated, for example&amp;nbsp;into&amp;nbsp;a command to change the color of such a Layer [lightly tested]:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;(defun C:CNLC (/ layname laycol); = Change Nested Layer's Color&lt;/P&gt;
&lt;P&gt;&amp;nbsp; (setq&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;&amp;nbsp; &amp;nbsp; layname&lt;/FONT&gt; (cdr (assoc 8 (entget (car (nentsel "\nSelect nested entity for its Layer name: ")))))&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &lt;FONT color="#FF00FF"&gt;laycol&lt;/FONT&gt; (getstring "\nColor to assign to that Layer: ")&lt;/P&gt;
&lt;P&gt;&amp;nbsp; )&lt;/P&gt;
&lt;P&gt;&amp;nbsp; (command "_.layer" "_color" &lt;FONT color="#FF00FF"&gt;laycol&lt;/FONT&gt;&amp;nbsp;&lt;FONT color="#0000FF"&gt;layname&lt;/FONT&gt; "")&lt;/P&gt;
&lt;P&gt;&amp;nbsp; (princ)&lt;/P&gt;
&lt;P&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That could be expanded to ask for and apply a linetype, if you normally change both, or a separate one could be made for any property you want to deal with one at a time, or if you always want to apply the same color to such Layers that you select, that could be hard-coded in without asking the User for it, etc., etc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2016 14:34:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/a-better-method-for-changing-xref-layers-in-current-drawing/m-p/6431442#M270160</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2016-07-12T14:34:15Z</dc:date>
    </item>
    <item>
      <title>Re: A better method for changing xref layers in current drawing?</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/a-better-method-for-changing-xref-layers-in-current-drawing/m-p/6431660#M270161</link>
      <description>This tmp layer filter is gold. Pure Gold! Thank you, I see many uses for this.</description>
      <pubDate>Tue, 12 Jul 2016 15:33:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/a-better-method-for-changing-xref-layers-in-current-drawing/m-p/6431660#M270161</guid>
      <dc:creator>claimed4all</dc:creator>
      <dc:date>2016-07-12T15:33:48Z</dc:date>
    </item>
    <item>
      <title>Re: A better method for changing xref layers in current drawing?</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/a-better-method-for-changing-xref-layers-in-current-drawing/m-p/8730957#M270162</link>
      <description>&lt;P&gt;Can you please post the full command?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2019 13:15:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/a-better-method-for-changing-xref-layers-in-current-drawing/m-p/8730957#M270162</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-04-15T13:15:55Z</dc:date>
    </item>
    <item>
      <title>Re: A better method for changing xref layers in current drawing?</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/a-better-method-for-changing-xref-layers-in-current-drawing/m-p/8731474#M270163</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Can you please post the full command?&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The CNLC command defined in Message 6 is "full" -- is that not what you're looking for?&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2019 16:09:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/a-better-method-for-changing-xref-layers-in-current-drawing/m-p/8731474#M270163</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2019-04-15T16:09:47Z</dc:date>
    </item>
    <item>
      <title>Re: A better method for changing xref layers in current drawing?</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/a-better-method-for-changing-xref-layers-in-current-drawing/m-p/8731708#M270164</link>
      <description>&lt;P&gt;Yes thanks&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2019 17:34:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/a-better-method-for-changing-xref-layers-in-current-drawing/m-p/8731708#M270164</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-04-15T17:34:50Z</dc:date>
    </item>
  </channel>
</rss>

