<?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: Automatic Layer Attributes in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/automatic-layer-attributes/m-p/12252662#M23949</link>
    <description>&lt;P&gt;run&amp;nbsp;&lt;STRONG&gt;points_layer_nonplottable&amp;nbsp;&lt;/STRONG&gt;command. it will make layers that contain "points" substring in their name non-plottable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="lisp"&gt;(defun c:points_layer_nonplottable nil
	(vlax-map-collection (vla-get-layers (vla-get-activedocument (vlax-get-acad-object)))
		'(lambda (object)
			(if (wcmatch (strcase (vla-get-name object)) "*POINTS*")
				(vlax-put object 'plottable 0)
			)
		 )
	)
	(princ)
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 20 Sep 2023 06:06:54 GMT</pubDate>
    <dc:creator>komondormrex</dc:creator>
    <dc:date>2023-09-20T06:06:54Z</dc:date>
    <item>
      <title>Automatic Layer Attributes</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/automatic-layer-attributes/m-p/12251884#M23944</link>
      <description>&lt;P&gt;im wondering if theres a lisp or even a feature already that when certain words are entered into the name of a layer it will change the attributes like color style linetype lineweight etc.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in my case it would be for when a user creates a new layer with the word "points" in the name that it would automatically be set to no-plot or whatever its called.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2023 20:26:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/automatic-layer-attributes/m-p/12251884#M23944</guid>
      <dc:creator>JohnC_ISM</dc:creator>
      <dc:date>2023-09-19T20:26:38Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic Layer Attributes</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/automatic-layer-attributes/m-p/12252055#M23945</link>
      <description>Nope, nothing built-in does that, but you can create templates for your users to use with all the desired settings in them, train them to dragn-drop from there using ADCENTER if always using your templates for all drawings is not something you all do, and/or blocks to insert that can also carry new layer settings with them, SCRIPT files to run/load all stock layers and their preferred settings anytime a user needs them, or LISP to create every nuance of a layer name/setting you can pre-program and so much more.&lt;BR /&gt;&lt;BR /&gt;Where would you like to begin?</description>
      <pubDate>Tue, 19 Sep 2023 21:47:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/automatic-layer-attributes/m-p/12252055#M23945</guid>
      <dc:creator>pendean</dc:creator>
      <dc:date>2023-09-19T21:47:20Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic Layer Attributes</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/automatic-layer-attributes/m-p/12252272#M23946</link>
      <description>&lt;P&gt;Our dwt had like 250 layers as it had to match CIV3D downloading field data, once that was done we ran a custom purge the layers would drop to around 100 max. This left behind all our design layers that we needed, a more aggressive purge at end of project could be done to remove more reducing dwg size as CIV3D bloats a dwg a bit.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Like others can always re-add layers via a lisp.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Sep 2023 00:43:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/automatic-layer-attributes/m-p/12252272#M23946</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2023-09-20T00:43:04Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic Layer Attributes</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/automatic-layer-attributes/m-p/12252438#M23947</link>
      <description>Ehhh idk where ahha. We make new layers every time we bring in new points with the field date points on em. That way we can keep track of which points and when.&lt;BR /&gt;I was tryna see if theres a lisp that runs when the user hits print that it automatically switches any layer with the word *points* it would check it to off.</description>
      <pubDate>Wed, 20 Sep 2023 02:56:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/automatic-layer-attributes/m-p/12252438#M23947</guid>
      <dc:creator>JohnC_ISM</dc:creator>
      <dc:date>2023-09-20T02:56:59Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic Layer Attributes</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/automatic-layer-attributes/m-p/12252439#M23948</link>
      <description>We use like 10 layers haha were not that advanced yet.</description>
      <pubDate>Wed, 20 Sep 2023 02:57:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/automatic-layer-attributes/m-p/12252439#M23948</guid>
      <dc:creator>JohnC_ISM</dc:creator>
      <dc:date>2023-09-20T02:57:30Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic Layer Attributes</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/automatic-layer-attributes/m-p/12252662#M23949</link>
      <description>&lt;P&gt;run&amp;nbsp;&lt;STRONG&gt;points_layer_nonplottable&amp;nbsp;&lt;/STRONG&gt;command. it will make layers that contain "points" substring in their name non-plottable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="lisp"&gt;(defun c:points_layer_nonplottable nil
	(vlax-map-collection (vla-get-layers (vla-get-activedocument (vlax-get-acad-object)))
		'(lambda (object)
			(if (wcmatch (strcase (vla-get-name object)) "*POINTS*")
				(vlax-put object 'plottable 0)
			)
		 )
	)
	(princ)
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Sep 2023 06:06:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/automatic-layer-attributes/m-p/12252662#M23949</guid>
      <dc:creator>komondormrex</dc:creator>
      <dc:date>2023-09-20T06:06:54Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic Layer Attributes</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/automatic-layer-attributes/m-p/12252965#M23950</link>
      <description>&lt;P&gt;Do you already have &lt;EM&gt;a master&lt;/EM&gt; layer defined in the drawing to inherit the properties from?&lt;/P&gt;
&lt;P&gt;In that case, in layer manager locate the master layer, rename it, and confirm by a &lt;STRONG&gt;comma&lt;/STRONG&gt;...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or I have a routine that creates a duplicate layer from preselected object or current layer...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(defun c:LayerDuplicate ( / new old ssl col lay dan) 
  
  (setq old (if (setq ssl (ssget "_I"))
	      (cdr (assoc 8 (entget (ssname ssl 0))))
	      (getvar 'CLAYER))
	new old)
  (while (not dan)
    (setq new (lisped new))
    (cond ((= new 0)
	   (setq new nil
		 dan T))
	  ((not (snvalid new 0))
	   (alert "Invalid layer name!"))
	  ((tblsearch "LAYER" new)
	   (alert (strcat "Layer already exists!\n" new " layer is now current!"))
	   (command "_.-layer" "_t" new "_s" new "")
	   (setq new nil
		 dan T))
	  ((setq dan T))))
  (if new
    (progn
      (if (:CopyLayer new old)
	(setvar 'CLAYER new))
;;;      (if (setq col (acad_colordlg (cdr (assoc 62 (setq lay (entget (tblobjname "LAYER" new))))) T))
;;;	(entmod (subst (cons 62 col)
;;;		       (assoc 62 lay)
;;;		       lay)))
      ))
  (if ssl (sssetfirst nil nil))
  (princ)
  )
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Sep 2023 08:35:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/automatic-layer-attributes/m-p/12252965#M23950</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2023-09-20T08:35:11Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic Layer Attributes</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/automatic-layer-attributes/m-p/12257744#M23951</link>
      <description>&lt;P&gt;If 10 then make a dwt with the correct layers set can easily purge the unused layers.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Sep 2023 00:11:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/automatic-layer-attributes/m-p/12257744#M23951</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2023-09-22T00:11:09Z</dc:date>
    </item>
  </channel>
</rss>

