<?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 with true Color in Lisp in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-with-true-color-in-lisp/m-p/7907390#M106557</link>
    <description>&lt;P&gt;I agree. I also prefer indexed colors.&lt;/P&gt;&lt;P&gt;In this routine that creates layer list I would also include lineweights.&lt;/P&gt;&lt;P&gt;Now you have all lineweights set to "default".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 04 Apr 2018 12:18:32 GMT</pubDate>
    <dc:creator>hak_vz</dc:creator>
    <dc:date>2018-04-04T12:18:32Z</dc:date>
    <item>
      <title>Create layer with true Color in Lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-with-true-color-in-lisp/m-p/7901643#M106542</link>
      <description>&lt;P&gt;I have a routine that creates layers &amp;amp; assigns the color &amp;amp; linetype but now i have to create a few that have the true color instead of the standard&amp;nbsp;autocad color index such as "0-255". Normally i would create a layer, assign it color 4 with a continuous linetype. How can i create a layer &amp;amp; assign it the color of "255,209,0" in lisp?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is a sample:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;("K-BEV" "4" "CONTINUOUS")&lt;BR /&gt;("K-BEV-MISC" "11" "CONTINUOUS")&lt;BR /&gt;("K-CENT-CKEP" "4" "CONTINUOUS")&lt;BR /&gt;("K-CENT-XXEX" "4" "CONTINUOUS")&lt;BR /&gt;("K-CENT-XXXP" "4" "CONTINUOUS")&lt;BR /&gt;("K-CHAS-CKEP" "4" "CONTINUOUS")&lt;BR /&gt;("K-DEMO" "255,209,0" "HIDDEN4")&lt;/P&gt;</description>
      <pubDate>Mon, 02 Apr 2018 17:36:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-with-true-color-in-lisp/m-p/7901643#M106542</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-04-02T17:36:48Z</dc:date>
    </item>
    <item>
      <title>Re: Create layer with true Color in Lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-with-true-color-in-lisp/m-p/7901968#M106543</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&amp;nbsp;&lt;P&gt;("K-BEV" "4" "CONTINUOUS")&lt;BR /&gt;("K-BEV-MISC" "11" "CONTINUOUS")&lt;BR /&gt;("K-CENT-CKEP" "4" "CONTINUOUS")&lt;BR /&gt;("K-CENT-XXEX" "4" "CONTINUOUS")&lt;BR /&gt;("K-CENT-XXXP" "4" "CONTINUOUS")&lt;BR /&gt;("K-CHAS-CKEP" "4" "CONTINUOUS")&lt;BR /&gt;("K-DEMO" "255,209,0" "HIDDEN4")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;PRE&gt;(defun truecolor (r g b)
 (+ (lsh (fix r) 16)
    (lsh (fix g) 8)
    (fix b)
 )
)

(defun create_layer (name linetype r g b)
  (setq lyr (tblsearch "layer" name) col (truecolor r g b) )
  (if (not lyr)
    (entmake
      (list (cons 0 "layer")
      (cons 100 "acdbsymboltablerecord")
      (cons 100 "acdblayertablerecord")
      (cons 2 name)
      (cons 6 linetype)
      (cons 62 198)
      (cons 420 col)
      (cons 70 0)))
    )
  (princ)
)&lt;BR /&gt;&lt;BR /&gt;Usage:&lt;BR /&gt;&lt;BR /&gt;(create_layer "K-DEMO" "HIDDEN4" 255 209 0)&lt;/PRE&gt;&lt;P&gt;I hope that's what you looking for!&lt;/P&gt;&lt;P&gt;At the time of layer creation you should have line type definition loaded.&lt;/P&gt;&lt;P&gt;If not use&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(setvar "expert" 3)&lt;BR /&gt;(command "-linetype" "load" "*" "acad.lin" "")&amp;nbsp;&amp;nbsp; ; or other&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Apr 2018 19:59:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-with-true-color-in-lisp/m-p/7901968#M106543</guid>
      <dc:creator>hak_vz</dc:creator>
      <dc:date>2018-04-02T19:59:32Z</dc:date>
    </item>
    <item>
      <title>Re: Create layer with true Color in Lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-with-true-color-in-lisp/m-p/7902122#M106544</link>
      <description>&lt;P&gt;it might be but i do not understand all of the code. It looks like you are creating an entity with entmake &amp;amp; creating a list with some cons cells. What turns the layer color into 255,209,0 &amp;amp; what applies that to &lt;SPAN&gt;K-DEMO&lt;/SPAN&gt;? Would i have to duplicate this code for the othe 3 layers that i need to have the true colors? I need to create these layers:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;LAYER:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;COLOR&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LINETYPE&lt;/P&gt;&lt;P&gt;K-DEMO&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 255,209,0&amp;nbsp; &amp;nbsp; &amp;nbsp;HIDDEN 4&lt;/P&gt;&lt;P&gt;K-EQPM&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0,33,235&amp;nbsp; &amp;nbsp; &amp;nbsp; CONTINUOUS&lt;/P&gt;&lt;P&gt;K-EQPM-OPTIONAL&amp;nbsp; &amp;nbsp;51,204,9&amp;nbsp; &amp;nbsp; &amp;nbsp; CONTINUOUS&lt;/P&gt;&lt;P&gt;K-EQPM-RELO&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;244,47,21&amp;nbsp; &amp;nbsp; CONTINUOUS&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Apr 2018 20:26:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-with-true-color-in-lisp/m-p/7902122#M106544</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-04-02T20:26:55Z</dc:date>
    </item>
    <item>
      <title>Re: Create layer with true Color in Lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-with-true-color-in-lisp/m-p/7902145#M106545</link>
      <description>&lt;P&gt;Try something like this:&lt;/P&gt;&lt;PRE&gt;(defun _addlayer (name color ltype plot / _rgb lt)
  (defun _rgb (l) (+ (lsh (fix (car l)) 16) (lsh (fix (cadr l)) 8) (fix (caddr l))))
  (cond	((not (tblsearch "layer" name))
	 (entmakex (list '(0 . "LAYER")
			 '(100 . "AcDbSymbolTableRecord")
			 '(100 . "AcDbLayerTableRecord")
			 '(70 . 0)
			 (cons 2 name)
			 (if (listp color)
			   (cons 420 (_rgb color))
			   (cons 62 color)
			 )
			 (cons 6
			       (if (tblsearch "ltype" ltype)
				 ltype
				 "continuous"
			       )
			 )
			 (cons 290 plot)
			 ;;1 = plottable 0 = not=plottable
		   )
	 )
	)
	((tblobjname "layer" name))
  )
)
;; (_addlayer "NewLayerName" '(69 69 69) "3Dash2" 1)
;; (_addlayer "NewLayerName2" 169 "3Dash2" 1)&lt;/PRE&gt;</description>
      <pubDate>Mon, 02 Apr 2018 20:34:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-with-true-color-in-lisp/m-p/7902145#M106545</guid>
      <dc:creator>ronjonp</dc:creator>
      <dc:date>2018-04-02T20:34:22Z</dc:date>
    </item>
    <item>
      <title>Re: Create layer with true Color in Lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-with-true-color-in-lisp/m-p/7902162#M106546</link>
      <description>&lt;P&gt;Would i be able&amp;nbsp;to apply this to my existing routine? I apologize for my lack of knowledge, i am still trying to learn lisp. Here is how we currently create our layers&lt;/P&gt;</description>
      <pubDate>Mon, 02 Apr 2018 20:42:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-with-true-color-in-lisp/m-p/7902162#M106546</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-04-02T20:42:09Z</dc:date>
    </item>
    <item>
      <title>Re: Create layer with true Color in Lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-with-true-color-in-lisp/m-p/7902186#M106547</link>
      <description>&lt;P&gt;Something like this should work:&lt;/P&gt;&lt;PRE&gt;(defun _addlayer (name color ltype plot / _rgb lt)
  (defun _rgb (l) (+ (lsh (fix (car l)) 16) (lsh (fix (cadr l)) 8) (fix (caddr l))))
  (cond	((not (tblsearch "layer" name))
	 (entmakex (list '(0 . "LAYER")
			 '(100 . "AcDbSymbolTableRecord")
			 '(100 . "AcDbLayerTableRecord")
			 '(70 . 0)
			 (cons 2 name)
			 (if (listp color)
			   (cons 420 (_rgb color))
			   (cons 62 color)
			 )
			 (cons 6
			       (if (tblsearch "ltype" ltype)
				 ltype
				 "continuous"
			       )
			 )
			 (cons 290 plot)
			 ;;1 = plottable 0 = not=plottable
		   )
	 )
	)
	((tblobjname "layer" name))
  )
)
(mapcar	'(lambda (x) (_addlayer (car x) (cadr x) (caddr x) (last x)))
	'(("0" 9 "CONTINUOUS" 1)
	      ;; ** Example to create RGB layer **
	      ("A-ADA-ACC-EXST_RGB" (55 65 75) "CONTINUOUS" 1)
	      ("A-ADA-ACC-EXST" 9 "CONTINUOUS" 1)
	      ("A-ADA-ACC-NEW" 4 "CONTINUOUS" 1)
	      ("A-ADA-CLEAR" 223 "HIDDEN2" 1)
	      ("A-ADA-CLEAR-FIXT" 223 "HIDDEN2" 1)
	      ("A-ANNO-DIMS" 31 "CONTINUOUS" 1)
	      ("A-ANNO-REVS" 22 "CONTINUOUS" 1)
	      ("A-ANNO-TEXT" 31 "CONTINUOUS" 1)
	      ("A-ANNO-TTLB" 230 "CONTINUOUS" 1)
	      ("A-AREA-GROSS" 2 "CONTINUOUS" 1)
	      ("A-AREA-WORK" 252 "CONTINUOUS" 1)
	      ("A-CLNG-DEMO" 2 "HIDDEN2" 1)
	      ("A-CLNG-GRID" 9 "CONTINUOUS" 1)
	      ("A-CLNG-GRID-EXST" 9 "CONTINUOUS" 1)
	      ("A-CLNG-GRID-PATT" 143 "CONTINUOUS" 1)
	      ("A-CLNG-MISC" 3 "CONTINUOUS" 1)
	      ("A-CLNG-SHADE" 252 "CONTINUOUS" 1)
	      ("A-CLNG-SOFFIT-EXST" 4 "HIDDEN2" 1)
	      ("A-CLNG-SOFFIT-NEW" 3 "HIDDEN2" 1)
	      ("A-CNTR" 4 "CONTINUOUS" 1)
	      ("A-CNTR-NEW" 4 "CONTINUOUS" 1)
	      ("A-DEMO-GLAZ" 2 "HIDDEN2" 1)
	      ("A-DEMO-ITEM" 2 "HIDDEN2" 1)
	      ("A-DEMO-WALL" 2 "HIDDEN2" 1)
	      ("A-DET-HEAVY" 6 "CONTINUOUS" 1)
	      ("A-DET-LIGHT" 13 "CONTINUOUS" 1)
	      ("A-DET-MEDIUM" 3 "CONTINUOUS" 1)
	      ("A-DET-PATT" 143 "CONTINUOUS" 1)
	      ("A-DET-XHEAVY" 5 "CONTINUOUS" 1)
	      ("A-DET-XLIGHT" 9 "CONTINUOUS" 1)
	      ("A-DOOR-EXT-EXST" 3 "CONTINUOUS" 1)
	      ("A-DOOR-EXT-NEW" 14 "CONTINUOUS" 1)
	      ("A-DOOR-INT-EXST" 4 "CONTINUOUS" 1)
	      ("A-DOOR-INT-NEW" 12 "CONTINUOUS" 1)
	      ("A-ESD-DEMO" 2 "HIDDEN2" 1)
	      ("A-ESD-EXST" 163 "CONTINUOUS" 1)
	      ("A-ESD-GRID" 9 "CENTER2" 1)
	      ("A-ESD-GRID-IDEN" 31 "CONTINUOUS" 1)
	      ("A-ESD-HEAVY" 6 "CONTINUOUS" 1)
	      ("A-ESD-LIGHT" 13 "CONTINUOUS" 1)
	      ("A-ESD-MEDIUM" 3 "CONTINUOUS" 1)
	      ("A-ESD-PATT" 143 "CONTINUOUS" 1)
	      ("A-ESD-XHEAVY" 5 "CONTINUOUS" 1)
	      ("A-ESD-XLIGHT" 9 "CONTINUOUS" 1)
	      ("A-FIXT-EQPM" 9 "CONTINUOUS" 1)
	      ("A-FIXT-FLOR-EXST" 9 "CONTINUOUS" 1)
	      ("A-FIXT-FLOR-NEW" 4 "CONTINUOUS" 1)
	      ("A-FIXT-SIGN" 4 "CONTINUOUS" 1)
	      ("A-FLOR-AISLE" 143 "CONTINUOUS" 1)
	      ("A-FLOR-OTLN" 4 "CONTINUOUS" 1)
	      ("A-FLOR-PATT" 143 "CONTINUOUS" 1)
	      ("A-FLOR-RAIL" 9 "CONTINUOUS" 1)
	      ("A-GLAZ-EXST" 9 "CONTINUOUS" 1)
	      ("A-GLAZ-INT-EXST" 9 "CONTINUOUS" 1)
	      ("A-GLAZ-INT-NEW" 11 "CONTINUOUS" 1)
	      ("A-GLAZ-NEW" 11 "CONTINUOUS" 1)
	      ("A-GLAZ-SILL-EXST" 15 "CONTINUOUS" 1)
	      ("A-GLAZ-SILL-INT-EXST" 15 "CONTINUOUS" 1)
	      ("A-GLAZ-SILL-INT-NEW" 11 "CONTINUOUS" 1)
	      ("A-GLAZ-SILL-NEW" 11 "CONTINUOUS" 1)
	      ("A-ITEM-NO-PLOT" 223 "CONTINUOUS" 1)
	      ("A-ROOF-CNPY-NEW" 4 "CONTINUOUS" 1)
	      ("A-ROOF-EQPM" 9 "CONTINUOUS" 1)
	      ("A-ROOF-GUTTER" 9 "CONTINUOUS" 1)
	      ("A-ROOF-LADR-EXT" 9 "CONTINUOUS" 1)
	      ("A-ROOF-LADR-INT" 9 "CONTINUOUS" 1)
	      ("A-ROOF-OTLN" 3 "HIDDEN2" 1)
	      ("A-ROOF-OTLN-DEMO" 2 "HIDDEN2" 1)
	      ("A-ROOF-OTLN-EXST" 143 "HIDDEN2" 1)
	      ("A-ROOF-PARA" 2 "CONTINUOUS" 1)
	      ("A-ROOF-PATT" 143 "CONTINUOUS" 1)
	      ("A-ROOF-SCREEN" 9 "CONTINUOUS" 1)
	      ("A-ROOF-SHADE" 252 "CONTINUOUS" 1)
	      ("A-ROOF-SIGN-NEW" 4 "CONTINUOUS" 1)
	      ("A-ROOF-SLOP" 9 "CONTINUOUS" 1)
	      ("A-STAIR-RAIL" 9 "CONTINUOUS" 1)
	      ("A-STAIR-RAIL-NEW" 9 "CONTINUOUS" 1)
	      ("A-STAIR-RISER" 2 "HIDDEN2" 1)
	      ("A-STAIR-RISER-NEW" 2 "HIDDEN2" 1)
	      ("A-STAIR-TREAD" 2 "CONTINUOUS" 1)
	      ("A-STAIR-TREAD-NEW" 2 "CONTINUOUS" 1)
	      ("A-WALL-EXT-EXST" 7 "CONTINUOUS" 1)
	      ("A-WALL-EXT-FNSH" 4 "CONTINUOUS" 1)
	      ("A-WALL-EXT-NEW" 6 "CONTINUOUS" 1)
	      ("A-WALL-HEAD" 3 "HIDDEN2" 1)
	      ("A-WALL-INT-EXST" 7 "CONTINUOUS" 1)
	      ("A-WALL-INT-FNSH" 3 "CONTINUOUS" 1)
	      ("A-WALL-INT-NEW" 6 "CONTINUOUS" 1)
	      ("A-WALL-LOW-EXST" 9 "CONTINUOUS" 1)
	      ("A-WALL-LOW-NEW" 11 "CONTINUOUS" 1)
	      ("A-WALL-LOW-PATT" 143 "CONTINUOUS" 1)
	      ("A-WALL-OVHD-NEW" 3 "HIDDEN2" 1)
	      ("A-WALL-PATT" 143 "CONTINUOUS" 1)
	      ("A-WALL-PRHT" 3 "CONTINUOUS" 1)
	      ("A-WALL-SHADE" 252 "CONTINUOUS" 1)
	      ("A-WALL-SHADE-INT" 252 "CONTINUOUS" 1)
	      ("A-WALL-STUD" 4 "CONTINUOUS" 1)
	      ("A-WALL-UNDER" 4 "HIDDEN2" 1)
	      ("C-PKNG-AREA-CURB" 15 "CONTINUOUS" 1)
	      ("C-PKNG-AREA-IMP" 13 "CONTINUOUS" 1)
	      ("C-PKNG-AREA-LAND" 11 "CONTINUOUS" 1)
	      ("C-PKNG-AREA-PER" 15 "CONTINUOUS" 1)
	      ("C-PKNG-CURB-EXST" 4 "CONTINUOUS" 1)
	      ("C-PKNG-CURB-NEW" 3 "CONTINUOUS" 1)
	      ("C-PKNG-CURB-PATT" 143 "CONTINUOUS" 1)
	      ("C-PKNG-CURB-SHADE" 252 "CONTINUOUS" 1)
	      ("C-PKNG-LAND-EXST" 4 "CONTINUOUS" 1)
	      ("C-PKNG-LAND-NEW" 3 "CONTINUOUS" 1)
	      ("C-PKNG-STRP-EXST" 9 "CONTINUOUS" 1)
	      ("C-PKNG-STRP-NEW" 9 "CONTINUOUS" 1)
	      ("C-SITE-CARS" 9 "CONTINUOUS" 1)
	      ("C-SITE-DEMO-ITEM" 2 "HIDDEN2" 1)
	      ("C-SITE-EQPM" 7 "CONTINUOUS" 1)
	      ("C-SITE-PATT" 143 "CONTINUOUS" 1)
	      ("C-SITE-PROPLINE" 2 "DASHDOT" 1)
	      ("C-SITE-UTILITIES-EXST" 4 "HIDDEN2" 1)
	      ("C-SITE-UTILITIES-NEW" 3 "HIDDEN2" 1)
	      ("C-SITE-SHADE" 252 "CONTINUOUS" 1)
	      ("C-SITE-SIGN" 2 "CONTINUOUS" 1)
	      ("DEFPOINTS" 223 "CONTINUOUS" 1)
	      ("E-CCTV" 3 "CONTINUOUS" 1)
	      ("E-COND" 3 "CONTINUOUS" 1)
	      ("E-HVAC-EQP" 2 "CONTINUOUS" 1)
	      ("E-IT" 3 "CONTINUOUS" 1)
	      ("E-IT-POWR" 3 "CONTINUOUS" 1)
	      ("E-IT-TEXT" 31 "CONTINUOUS" 1)
	      ("E-LGHT" 2 "CONTINUOUS" 1)
	      ("E-LGHT-IDEN" 31 "CONTINUOUS" 1)
	      ("E-LGHT-ROOF" 2 "CONTINUOUS" 1)
	      ("E-LGHT-SOFF" 2 "CONTINUOUS" 1)
	      ("E-LITE-EMER" 3 "CONTINUOUS" 1)
	      ("E-LITE-EXT-EXST" 3 "CONTINUOUS" 1)
	      ("E-LITE-EXT-NEW" 3 "CONTINUOUS" 1)
	      ("E-LITE-EXT-ROOF" 3 "CONTINUOUS" 1)
	      ("E-LITE-FIXT-KITCHEN" 9 "CONTINUOUS" 1)
	      ("E-LITE-FLUR" 3 "CONTINUOUS" 1)
	      ("E-LITE-FLUR-EXST" 9 "CONTINUOUS" 1)
	      ("E-LITE-IDEN" 31 "CONTINUOUS" 1)
	      ("E-LITE-NOTE" 31 "CONTINUOUS" 1)
	      ("E-LITE-SECU" 6 "CONTINUOUS" 1)
	      ("E-LITE-SITE-NEW" 3 "CONTINUOUS" 1)
	      ("E-LITE-TRAC" 3 "CONTINUOUS" 1)
	      ("E-LITE-WIRE" 31 "CONTINUOUS" 1)
	      ("E-PNL" 3 "CONTINUOUS" 1)
	      ("E-POWR" 3 "CONTINUOUS" 1)
	      ("E-POWR-ROOF" 3 "CONTINUOUS" 1)
	      ("E-POWR-SWITCH" 3 "CONTINUOUS" 1)
	      ("E-POWR-WIRE" 2 "CONTINUOUS" 1)
	      ("E-PPWR-DIMS" 4 "CONTINUOUS" 1)
	      ("E-PPWR-ROOF-TEXT" 31 "CONTINUOUS" 1)
	      ("E-PPWR-SYMB" 3 "CONTINUOUS" 1)
	      ("E-PPWR-TEXT" 31 "CONTINUOUS" 1)
	      ("E-ROOF-NOTE" 31 "CONTINUOUS" 1)
	      ("E-ROOF-WIRE" 31 "CONTINUOUS" 1)
	      ("E-SITE-POWR" 3 "CONTINUOUS" 1)
	      ("E-SITE-POWR-TEXT" 31 "CONTINUOUS" 1)
	      ("E-SOUN" 3 "CONTINUOUS" 1)
	      ("E-SWCH" 3 "CONTINUOUS" 1)
	      ("F-ALRM-NOTE" 31 "CONTINUOUS" 1)
	      ("F-FIXT" 4 "CONTINUOUS" 1)
	      ("F-PROT-EQPM" 3 "CONTINUOUS" 1)
	      ("F-SPRN" 3 "CONTINUOUS" 1)
	      ("K-EQPH-CKXX" 4 "CONTINUOUS" 1)
	      ("K-EQPH-XXEP" 4 "CONTINUOUS" 1)
	      ("K-EQPH-XXEX" 4 "PHANTOM" 1)
	      ("K-EQPM-BLOK" 4 "CONTINUOUS" 1)
	      ("K-EQPM-BLOK-EXST" 255 "CONTINUOUS" 1)
	      ("K-EQPM-CASH" 4 "CONTINUOUS" 1)
	      ("K-EQPM-CKXX" 4 "CONTINUOUS" 1)
	      ("K-EQPM-CURB" 4 "CONTINUOUS" 1)
	      ("K-EQPM-EXST" 252 "CONTINUOUS" 1)
	      ("K-EQPM-GRILL" 4 "CONTINUOUS" 1)
	      ("K-EQPM-IDEN" 31 "CONTINUOUS" 1)
	      ("K-EQPM-MENU" 4 "HIDDEN2" 1)
	      ("K-EQPM-MISC" 11 "CONTINUOUS" 1)
	      ("K-EQPM-NEW" 4 "CONTINUOUS" 1)
	      ("K-EQPM-OPTIONAL-XXEP" 82 "PHANTOM4" 1)
	      ("K-EQPM-POS" 4 "CONTINUOUS" 1)
	      ("K-EQPM-RELO" 1 "CONTINUOUS" 1)
	      ("K-EQPM-RELO-XXEP" 1 "CONTINUOUS" 1)
	      ("K-EQPM-SAFE" 4 "CONTINUOUS" 1)
	      ("K-EQPM-XXEP" 170 "CONTINUOUS" 1)
	      ("K-EQPO-CKEP" 4 "CONTINUOUS" 1)
	      ("K-EQPO-CKEX" 4 "CONTINUOUS" 1)
	      ("K-EQPO-CKXX" 4 "CONTINUOUS" 1)
	      ("K-FRZH-XXEP" 4 "CONTINUOUS" 1)
	      ("K-FRZR-CKXX" 4 "CONTINUOUS" 1)
	      ("K-FRZR-CKXX-DOOR" 4 "CONTINUOUS" 1)
	      ("K-PCVR-DIMS" 4 "CONTINUOUS" 1)
	      ("K-PCVR-SYMB" 4 "CONTINUOUS" 1)
	      ("K-PCVR-TEXT" 4 "CONTINUOUS" 1)
	      ("K-PKIT-DIMS" 4 "CONTINUOUS" 1)
	      ("K-PKIT-SYMB" 3 "CONTINUOUS" 1)
	      ("K-PKIT-TEXT" 3 "CONTINUOUS" 1)
	      ("K-ROOF-EQPM-NEW" 3 "CONTINUOUS" 1)
	      ("M-ANNO-DIMS" 31 "CONTINUOUS" 1)
	      ("M-ANNO-TEXT" 31 "CONTINUOUS" 1)
	      ("M-CHAS-CENT" 2 "CENTER2" 1)
	      ("M-DUCT" 2 "CONTINUOUS" 1)
	      ("M-DUCT-CENT" 4 "CENTER8" 1)
	      ("M-DUCT-CENT-EXST" 2 "CENTER8" 1)
	      ("M-DUCT-CENT-NEW" 2 "CENTER8" 1)
	      ("M-DUCT-DMPR" 2 "CONTINUOUS" 1)
	      ("M-DUCT-FITT" 3 "CONTINUOUS" 1)
	      ("M-DUCT-FLEX" 2 "CONTINUOUS" 1)
	      ("M-DUCT-HOOD" 2 "CONTINUOUS" 1)
	      ("M-DUCT-HOOD-EXST" 2 "CONTINUOUS" 1)
	      ("M-DUCT-HOOD-NEW" 2 "CONTINUOUS" 1)
	      ("M-DUCT-HOOD-RELO" 2 "CONTINUOUS" 1)
	      ("M-DUCT-IDEN" 3 "CONTINUOUS" 1)
	      ("M-DUCT-INSL" 2 "CONTINUOUS" 1)
	      ("M-DUCT-NOTE" 31 "CONTINUOUS" 1)
	      ("M-FITT" 6 "CONTINUOUS" 1)
	      ("M-HOOD" 2 "CONTINUOUS" 1)
	      ("M-HOOD-DUCT" 2 "CONTINUOUS" 1)
	      ("M-HVAC-CDFF" 2 "CONTINUOUS" 1)
	      ("M-HVAC-CDFF-DUCT" 2 "CONTINUOUS" 1)
	      ("M-HVAC-CDFF-NEW" 3 "CONTINUOUS" 1)
	      ("M-HVAC-CLEAR" 4 "HIDDEN2" 1)
	      ("M-HVAC-CLNG" 2 "CONTINUOUS" 1)
	      ("M-HVAC-DMPR" 5 "DGN Style 2" 1)
	      ("M-HVAC-DUCT" 5 "DGN Style 2" 1)
	      ("M-HVAC-EQPM" 8 "HIDDEN2" 1)
	      ("M-HVAC-FLOR" 2 "CONTINUOUS" 1)
	      ("M-HVAC-NOTE" 31 "CONTINUOUS" 1)
	      ("M-PHVA-DIMS" 4 "CONTINUOUS" 1)
	      ("M-PHVA-SYMB" 3 "CONTINUOUS" 1)
	      ("M-PHVA-TEXT" 3 "CONTINUOUS" 1)
	      ("M-ROOF-EQPM-CLEAR" 4 "HIDDEN2" 1)
	      ("M-ROOF-EQPM-DEMO" 7 "HIDDEN2" 1)
	      ("M-ROOF-EQPM-EXST" 7 "CONTINUOUS" 1)
	      ("M-ROOF-EQPM-EXST-CURB" 1 "HIDDEN4" 1)
	      ("M-ROOF-EQPM-EXST-DROP" 1 "HIDDEN4" 1)
	      ("M-ROOF-EQPM-IDEN" 31 "CONTINUOUS" 1)
	      ("M-ROOF-EQPM-NEW" 3 "CONTINUOUS" 1)
	      ("M-ROOF-EQPM-NEW-CURB" 3 "HIDDEN4" 1)
	      ("M-ROOF-EQPM-NEW-DROP" 3 "HIDDEN4" 1)
	      ("M-ROOF-EQPM-TEXT" 31 "CONTINUOUS" 1)
	      ("M-ROOF-NOTE" 31 "CONTINUOUS" 1)
	      ("P-CENT" 4 "CONTINUOUS" 1)
	      ("P-DOMW-COLD" 160 "DOMESTIC_COLD_WATER" 1)
	      ("P-DOMW-COLD-N" 160 "DOMESTIC_COLD_WATER" 1)
	      ("P-DOMW-FILT" 161 "CONTINUOUS" 1)
	      ("P-DOMW-FILT-N" 161 "CONTINUOUS" 1)
	      ("P-DOMW-FIXT" 4 "CONTINUOUS" 1)
	      ("P-DOMW-H110" 210 "2DASHES" 1)
	      ("P-DOMW-H110-N" 210 "2DASHES" 1)
	      ("P-DOMW-H140" 20 "DOMESTIC_HOT_WATER" 1)
	      ("P-DOMW-H140-N" 20 "DOMESTIC_HOT_WATER" 1)
	      ("P-DOMW-NOTE" 31 "CONTINUOUS" 1)
	      ("P-FIXT" 4 "CONTINUOUS" 1)
	      ("P-FIXT-ABOV" 4 "CONTINUOUS" 1)
	      ("P-FIXT-EXST" 9 "CONTINUOUS" 1)
	      ("P-FIXT-FILT" 3 "CONTINUOUS" 1)
	      ("P-FIXT-NEW" 4 "CONTINUOUS" 1)
	      ("P-FIXT-NOTE" 31 "CONTINUOUS" 1)
	      ("P-FIXT-RELO" 4 "CONTINUOUS" 1)
	      ("P-FIXT-XXEX" 4 "CONTINUOUS" 1)
	      ("P-GAS" 4 "CONTINUOUS" 1)
	      ("P-GAS-FIXT" 4 "CONTINUOUS" 1)
	      ("P-GAS-NOTE" 31 "CONTINUOUS" 1)
	      ("P-PFLR-DIMS" 4 "CONTINUOUS" 1)
	      ("P-PFLR-LEAD" 4 "CONTINUOUS" 1)
	      ("P-PFLR-SYMB" 3 "CONTINUOUS" 1)
	      ("P-PFLR-TEXT" 3 "CONTINUOUS" 1)
	      ("P-PLMB" 3 "CONTINUOUS" 1)
	      ("P-PLMB-ROOF" 3 "CONTINUOUS" 1)
	      ("P-PLMB-ROUGH" 3 "CONTINUOUS" 1)
	      ("P-PLMB-SERV-GAS" 44 "PHANTOM4" 1)
	      ("P-PLMB-SERV-SANG" 191 "UNDERGROUND_GSANITARY" 1)
	      ("P-PLMB-SERV-SANS" 190 "UNDERGROUND_SANITARY" 1)
	      ("P-PLMB-SERV-VENT" 2 "CONTINUOUS" 1)
	      ("P-PLMB-SERV-WTR-COLD" 160 "CENTER2" 1)
	      ("P-PLMB-SERV-WTR-COLDF" 161 "CENTER4" 1)
	      ("P-PLMB-SERV-WTR-HOT" 20 "HIDDEN2" 1)
	      ("P-PLMB-SERV-WTR-HOTT" 210 "HIDDEN4" 1)
	      ("P-PLMB-SERV-STRM" 160 "CENTER2" 1)
	      ("P-ROOF-VENT" 3 "CONTINUOUS" 1)
	      ("P-SAN-FIXT" 4 "CONTINUOUS" 1)
	      ("P-SAN-NOTE" 31 "CONTINUOUS" 1)
	      ("P-SANR-EQPM" 4 "CONTINUOUS" 1)
	      ("P-SANR-SYMB" 3 "CONTINUOUS" 1)
	      ("P-SLAB" 3 "CONTINUOUS" 1)
	      ("P-SODA" 190 "FENCELINE1" 1)
	      ("P-SPRK" 60 "HIDDEN4" 1)
	      ("P-SPRK-FIXT" 3 "CONTINUOUS" 1)
	      ("P-SPRK-NOTE" 31 "CONTINUOUS" 1)
	      ("P-STRM" 3 "CONTINUOUS" 1)
	      ("P-STRM-FIXT" 3 "CONTINUOUS" 1)
	      ("P-STRM-NOTE" 31 "CONTINUOUS" 1)
	      ("P-STRM-ROOF" 3 "CONTINUOUS" 1)
	      ("P-SYMB" 3 "CONTINUOUS" 1)
	      ("P-UGRD-DIMS" 4 "CONTINUOUS" 1)
	      ("P-UGRD-SYMB" 3 "CONTINUOUS" 1)
	      ("P-UGRD-TEXT" 3 "CONTINUOUS" 1)
	      ("P-VENT" 3 "CONTINUOUS" 1)
	      ("S-COLS-EXST" 2 "CONTINUOUS" 1)
	      ("S-COLS-NEW" 6 "CONTINUOUS" 1)
	      ("S-CONC-CURB" 3 "CONTINUOUS" 1)
	      ("S-CONC-CURB-PATT" 143 "CONTINUOUS" 1)
	      ("S-DEMO-ITEM" 2 "HIDDEN2" 1)
	      ("S-FLOR-BEAM-EXST" 4 "CENTER2" 1)
	      ("S-FLOR-BEAM-NEW" 10 "CENTER2" 1)
	      ("S-FLOR-FRAM-EXST" 4 "CONTINUOUS" 1)
	      ("S-FLOR-FRAM-NEW" 3 "CONTINUOUS" 1)
	      ("S-FNDN-EXST" 3 "CONTINUOUS" 1)
	      ("S-FNDN-NEW" 6 "CONTINUOUS" 1)
	      ("S-FNDN-OUTLINE" 3 "HIDDEN2" 1)
	      ("S-FNDN-PATT" 143 "CONTINUOUS" 1)
	      ("S-FOOTING-EXST" 2 "HIDDEN2" 1)
	      ("S-FOOTING-NEW" 4 "HIDDEN2" 1)
	      ("S-GRID-EXST" 9 "CENTER2" 1)
	      ("S-GRID-IDEN-EXST" 31 "CONTINUOUS" 1)
	      ("S-GRID-IDEN-NEW" 31 "CONTINUOUS" 1)
	      ("S-GRID-NEW" 11 "CENTER2" 1)
	      ("S-ROOF-BEAM-EXST" 4 "CENTER2" 1)
	      ("S-ROOF-BEAM-NEW" 10 "CENTER2" 1)
	      ("S-ROOF-FRAM-EXST" 4 "CONTINUOUS" 1)
	      ("S-ROOF-FRAM-NEW" 3 "CONTINUOUS" 1)
	      ("S-SECTY-FIXT" 3 "CONTINUOUS" 1)
	      ("S-SECTY-NOTE" 31 "CONTINUOUS" 1)
	      ("S-SLAB-LEVL" 4 "CONTINUOUS" 1)
	      ("S-WALL-FRAM-EXST" 4 "CONTINUOUS" 1)
	      ("S-WALL-FRAM-NEW" 3 "CONTINUOUS" 1)
	      ("SYMB" 3 "CONTINUOUS" 1)
	      ("TEXT" 31 "CONTINUOUS" 1)
	)
)&lt;/PRE&gt;</description>
      <pubDate>Mon, 02 Apr 2018 20:57:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-with-true-color-in-lisp/m-p/7902186#M106547</guid>
      <dc:creator>ronjonp</dc:creator>
      <dc:date>2018-04-02T20:57:10Z</dc:date>
    </item>
    <item>
      <title>Re: Create layer with true Color in Lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-with-true-color-in-lisp/m-p/7902198#M106548</link>
      <description>&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;I'm going to break this down &amp;amp; see if i can understand it. i appreciate the help&lt;/P&gt;</description>
      <pubDate>Mon, 02 Apr 2018 21:01:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-with-true-color-in-lisp/m-p/7902198#M106548</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-04-02T21:01:25Z</dc:date>
    </item>
    <item>
      <title>Re: Create layer with true Color in Lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-with-true-color-in-lisp/m-p/7902252#M106549</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymouswrote:&lt;BR /&gt;&lt;P&gt;it might be but i do not understand all of the code. It looks like you are creating an entity with entmake &amp;amp; creating a list with some cons cells. What turns the layer color into 255,209,0 &amp;amp; what applies that to &lt;SPAN&gt;K-DEMO&lt;/SPAN&gt;? Would i have to duplicate this code for the othe 3 layers that i need to have the true colors? I need to create these layers:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;LAYER:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;COLOR&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LINETYPE&lt;/P&gt;&lt;P&gt;K-DEMO&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 255,209,0&amp;nbsp; &amp;nbsp; &amp;nbsp;HIDDEN 4&lt;/P&gt;&lt;P&gt;K-EQPM&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0,33,235&amp;nbsp; &amp;nbsp; &amp;nbsp; CONTINUOUS&lt;/P&gt;&lt;P&gt;K-EQPM-OPTIONAL&amp;nbsp; &amp;nbsp;51,204,9&amp;nbsp; &amp;nbsp; &amp;nbsp; CONTINUOUS&lt;/P&gt;&lt;P&gt;K-EQPM-RELO&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;244,47,21&amp;nbsp; &amp;nbsp; CONTINUOUS&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;No. I+ve created a function that looks in layers table to see if layer with a name exist. If it don't it creates new layer .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In your code insert my function and create how many layers you want by calling function&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;&lt;PRE&gt;&lt;BR /&gt;(create_layer "K-DEMO" "HIDDEN4" 255 209 0)&lt;BR /&gt;(create_layer "K-EQPM"&amp;nbsp; "CONTINUOUS" 0 33 235)&lt;BR /&gt;(create_layer "K-EQPM-OPTIONAL"&amp;nbsp; "CONTINUOUS" 51 204 9)&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;BR /&gt;(create_layer "K-EQPM-RELO" "continuous" 244 47 21)&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Apr 2018 21:22:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-with-true-color-in-lisp/m-p/7902252#M106549</guid>
      <dc:creator>hak_vz</dc:creator>
      <dc:date>2018-04-02T21:22:29Z</dc:date>
    </item>
    <item>
      <title>Re: Create layer with true Color in Lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-with-true-color-in-lisp/m-p/7902280#M106550</link>
      <description>&lt;P&gt;Just put my code to the top or bottom of the list in your code.&lt;/P&gt;&lt;P&gt;Copy code for creating those layers and&lt;/P&gt;&lt;P&gt;In your list delete rows that are there to create layers with truecolor.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Apr 2018 21:33:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-with-true-color-in-lisp/m-p/7902280#M106550</guid>
      <dc:creator>hak_vz</dc:creator>
      <dc:date>2018-04-02T21:33:29Z</dc:date>
    </item>
    <item>
      <title>Re: Create layer with true Color in Lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-with-true-color-in-lisp/m-p/7902324#M106551</link>
      <description>&lt;P&gt;Thanks for the help. i will print your code out&amp;nbsp; &amp;amp; try to understand what you did. i appreciate the help&lt;/P&gt;</description>
      <pubDate>Mon, 02 Apr 2018 21:53:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-with-true-color-in-lisp/m-p/7902324#M106551</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-04-02T21:53:36Z</dc:date>
    </item>
    <item>
      <title>Re: Create layer with true Color in Lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-with-true-color-in-lisp/m-p/7904480#M106552</link>
      <description>&lt;P&gt;Looks like this only works if the layer is not already in the drawing. Also i discovered that if the linetype is not already in my acad.lin file it also does not work. I have had this issue before.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Apr 2018 14:40:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-with-true-color-in-lisp/m-p/7904480#M106552</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-04-03T14:40:00Z</dc:date>
    </item>
    <item>
      <title>Re: Create layer with true Color in Lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-with-true-color-in-lisp/m-p/7904814#M106553</link>
      <description>&lt;P&gt;Try this instead. Will attempt to load the linetype if found in the acad*.lin file and if the layer exists, it will update the properties.&lt;/P&gt;&lt;PRE&gt;(defun _addlayer (name color ltype plot / _loadlinetype _rgb d e)
  ;; RJP - 04.03.2018
  ;; Creates or updates a layer
  (defun _rgb (l) (+ (lsh (fix (car l)) 16) (lsh (fix (cadr l)) 8) (fix (caddr l))))
  (defun _loadlinetype (linetype / lt out)
    (cond ((tblobjname "ltype" linetype) t)
	  ((setq lt (vla-get-linetypes (vla-get-activedocument (vlax-get-acad-object))))
	   (setq out (vl-catch-all-apply
		       'vla-load
		       (list lt
			     linetype
			     (findfile (if (= 0 (getvar 'measurement))
					 "acad.lin"
					 "acadiso.lin"
				       )
			     )
		       )
		     )
	   )
	   (not (vl-catch-all-error-p out))
	  )
    )
  )
  (setq	d (apply 'append
		 (list (if (setq e (tblobjname "layer" name))
			 (entget e '("*"))
			 (list '(0 . "LAYER")
			       '(100 . "AcDbSymbolTableRecord")
			       '(100 . "AcDbLayerTableRecord")
			       '(70 . 0)
			 )
		       )
		       (list (cons 2 name)
			     (if (listp color)
			       (cons 420 (_rgb color))
			       (cons 62 color)
			     )
			     (cons 6
				   (if (_loadlinetype ltype)
				     ltype
				     "continuous"
				   )
			     )
			     (cons 290 plot)
		       )
		       ;;1 = plottable 0 = not=plottable
		 )
	  )
  )
  (if e
    (entmod d)
    (entmakex d)
  )
)
(vl-load-com)
;; (_addlayer "NewLayerName3" '(89 88 88) "Hidden2" 1)
;; (_addlayer "NewLayerName3" 7 "Foo" 0)&lt;/PRE&gt;</description>
      <pubDate>Tue, 03 Apr 2018 16:08:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-with-true-color-in-lisp/m-p/7904814#M106553</guid>
      <dc:creator>ronjonp</dc:creator>
      <dc:date>2018-04-03T16:08:03Z</dc:date>
    </item>
    <item>
      <title>Re: Create layer with true Color in Lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-with-true-color-in-lisp/m-p/7904848#M106554</link>
      <description>&lt;P&gt;yeh thanks. That's a problem that i have had. I didn't realize it until later that if you don't have the linetype defined in the acad.lin file it defaults to continuous&lt;/P&gt;</description>
      <pubDate>Tue, 03 Apr 2018 16:15:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-with-true-color-in-lisp/m-p/7904848#M106554</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-04-03T16:15:53Z</dc:date>
    </item>
    <item>
      <title>Re: Create layer with true Color in Lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-with-true-color-in-lisp/m-p/7906513#M106555</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymouswrote:&lt;BR /&gt;&lt;P&gt;Looks like this only works if the layer is not already in the drawing. Also i discovered that if the linetype is not already in my acad.lin file it also does not work. I have had this issue before.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Yes. It only works if layer isn't in a drawing, since you can not create two layers with same name&amp;nbsp; - first row in a script (tblsearch "layer" name).&lt;/P&gt;&lt;P&gt;&amp;nbsp;So you have to delete rows in your script that create layers with true color I sayed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;About linetype.&amp;nbsp; Hidden4 is not standard definition (maybe I'm wrong). Copy its definition in acad line, or put autolisp code that I provided on the top of your list.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(setvar "expert" 3)&lt;BR /&gt;(command "-linetype" "load" "*" "acad.lin" "")&amp;nbsp; ; or any other linetype definition here&lt;/P&gt;&lt;PRE&gt;(defun truecolor (r g b)
 (+ (lsh (fix r) 16)
    (lsh (fix g) 8)
    (fix b)
 )
)

(defun create_layer (name linetype r g b)
  (setq lyr (tblsearch "layer" name) col (truecolor r g b) )
  (if (not lyr)
    (entmake
      (list (cons 0 "layer")
      (cons 100 "acdbsymboltablerecord")
      (cons 100 "acdblayertablerecord")
      (cons 2 name)
      (cons 6 linetype)
      (cons 62 198)
      (cons 420 col)
      (cons 70 0)))
    )
  (princ)
)&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;PRE&gt;(create_layer "K-DEMO" "HIDDEN4" 255 209 0)&lt;BR /&gt;(create_layer "K-EQPM"&amp;nbsp; "CONTINUOUS" 0 33 235)&lt;BR /&gt;(create_layer "K-EQPM-OPTIONAL"&amp;nbsp; "CONTINUOUS" 51 204 9)&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;BR /&gt;(create_layer "K-EQPM-RELO" "continuous" 244 47 21)&amp;nbsp; &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;- Your script here&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;This was all you had to do.&lt;/P&gt;&lt;P&gt;I would create empty drawing with all layers , text sizes and so on created.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Apr 2018 05:35:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-with-true-color-in-lisp/m-p/7906513#M106555</guid>
      <dc:creator>hak_vz</dc:creator>
      <dc:date>2018-04-04T05:35:58Z</dc:date>
    </item>
    <item>
      <title>Re: Create layer with true Color in Lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-with-true-color-in-lisp/m-p/7907247#M106556</link>
      <description>&lt;P&gt;Thanks. We have a template that has everything in it but sometimes things get purged or something so this routine creates everything again. I might make this a separate routine &amp;amp; experiment with it. I have since convinced my coworkers to just go with index colors since that already works &amp;amp; it is much more simple to work with in lisp. There are still situations where i can use the true color so i would like to get something to work. For instance we do some elevations where we want to use true colors &amp;amp; it would be good to have something to set up everything if things get lost.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Apr 2018 11:23:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-with-true-color-in-lisp/m-p/7907247#M106556</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-04-04T11:23:48Z</dc:date>
    </item>
    <item>
      <title>Re: Create layer with true Color in Lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-with-true-color-in-lisp/m-p/7907390#M106557</link>
      <description>&lt;P&gt;I agree. I also prefer indexed colors.&lt;/P&gt;&lt;P&gt;In this routine that creates layer list I would also include lineweights.&lt;/P&gt;&lt;P&gt;Now you have all lineweights set to "default".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Apr 2018 12:18:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-with-true-color-in-lisp/m-p/7907390#M106557</guid>
      <dc:creator>hak_vz</dc:creator>
      <dc:date>2018-04-04T12:18:32Z</dc:date>
    </item>
    <item>
      <title>Re: Create layer with true Color in Lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-with-true-color-in-lisp/m-p/7907446#M106558</link>
      <description>&lt;P&gt;We do have some elevations that we do in color which we use the true color. We set the lineweight&amp;nbsp;in our ctb file according to the color. i do have to figure out how to add some linetypes to the acad.lin file because it its a blank drawing &amp;amp; the line type is not in the drawing it uses the default which is continuous.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Apr 2018 12:37:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-with-true-color-in-lisp/m-p/7907446#M106558</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-04-04T12:37:09Z</dc:date>
    </item>
    <item>
      <title>Re: Create layer with true Color in Lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-with-true-color-in-lisp/m-p/7907651#M106559</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;
&lt;P&gt;...&amp;nbsp;the line type is not in the drawing it uses the default which is continuous.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;In (entmake)ing&amp;nbsp;a Layer [at least in Acad2016 I have here], it doesn't even do that, but simply does not create the Layer at all.&amp;nbsp; It &lt;EM&gt;does&lt;/EM&gt;&amp;nbsp; at least create it, and default to Continuous&amp;nbsp;if it doesn't find the specified linetype, when using (command "_.layer" "_make" ....) [or "_new"].&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BUT another advantage of the&amp;nbsp;(command)-function way is that &lt;EM&gt;if&lt;/EM&gt;&amp;nbsp; the specified linetype is in acad.lin, it does &lt;EM&gt;not&lt;/EM&gt;&amp;nbsp; even need to be loaded into the drawing first -- &lt;EM&gt;it will find it&lt;/EM&gt;,&amp;nbsp;which (entmake) isn't smart enough to do.&amp;nbsp; [That's why I said "if it doesn't find the specified linetype" above, rather than "if the linetype is not loaded."]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, if you have a very large number of Layers, the (command) approach could take noticeably longer than the (entmake) approach.&amp;nbsp; That can be lessened by&amp;nbsp;not doing each one separately, but applying options to&amp;nbsp;comma-delimited multiple-Layer-name strings, for example in your sampling [other than the one TrueColor Layer]:&lt;/P&gt;
&lt;P&gt;(command "_.layer"&lt;/P&gt;
&lt;P&gt;&amp;nbsp; "_new" "K-BEV,K-BEV-MISC,K-CENT-CKEP,K-CENT-XXEX,K-CENT-XXXP,K-CHAS-CKEP"&lt;/P&gt;
&lt;P&gt;&amp;nbsp; "_color" 4 "K-CENT-CKEP,K-CENT-XXEX,K-CENT-XXXP,K-CHAS-CKEP"&lt;/P&gt;
&lt;P&gt;&amp;nbsp; "_color" 11 "K-BEV-MISC"&lt;/P&gt;
&lt;P&gt;&amp;nbsp; ""&lt;/P&gt;
&lt;P&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And you never have to &lt;EM&gt;assign&lt;/EM&gt;&amp;nbsp; Continuous as a linetype in the (command) approach as you do with (entmake)&amp;nbsp;-- only &lt;EM&gt;non&lt;/EM&gt;-continuous types.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another advantage is that it won't matter if a Layer is already in the drawing.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Apr 2018 14:02:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-with-true-color-in-lisp/m-p/7907651#M106559</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2018-04-04T14:02:04Z</dc:date>
    </item>
    <item>
      <title>Re: Create layer with true Color in Lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-with-true-color-in-lisp/m-p/7907652#M106560</link>
      <description>&lt;P&gt;This &lt;A href="https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-with-true-color-in-lisp/m-p/7904814/highlight/true#M367339" target="_blank"&gt;CODE&lt;/A&gt; here should do what you want ( RGB or index colors ).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;;; Truecolor example
(_addlayer "NewLayerName3" '(89 88 88) "Hidden2" 1)
;; Index example .. will default to continuous linetype since 'foo' is not defined in the acad.lin and will not plot ( 0 at the end )
(_addlayer "NewLayerName3" 7 "Foo" 0)
;; Example to iterate a list
(foreach layer (list ("NewLayerName3" '(89 88 88) "Hidden2" 1)
		     ("NewLayerName4" 7 "Foo" 0)
		     ("NewLayerName5" '(0 0 255) "Dashed" 1)
	       )
  (_addlayer (car layer) (cadr layer) (caddr layer) (last layer))
)&lt;/PRE&gt;&lt;P&gt;Easy peasy &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Apr 2018 14:04:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-with-true-color-in-lisp/m-p/7907652#M106560</guid>
      <dc:creator>ronjonp</dc:creator>
      <dc:date>2018-04-04T14:04:59Z</dc:date>
    </item>
    <item>
      <title>Re: Create layer with true Color in Lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-with-true-color-in-lisp/m-p/7907677#M106561</link>
      <description>&lt;P&gt;OK. Before we jump into editing acad.lin&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At the top of your layer generation script add next line&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(command "-linetype" "load" "*" "acad.lin" "")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or if you want to just load some lintype&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(command "-linetype" "load" "dashed" "acad.lin" "")&lt;/P&gt;&lt;P&gt;(command "-linetype" "load" "border" "acad.lin" "")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then open a new empty drawing and check if all layers are generated correctly&lt;/P&gt;&lt;P&gt;in regard linetype definition. When you open new drawing just few definitions are&lt;/P&gt;&lt;P&gt;loaded but we want to be sure that all linetype definitions are preloaded.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If some linetype definition is missing I'll explain how to add additional linetype&lt;/P&gt;&lt;P&gt;definitions to acad.lin&lt;/P&gt;</description>
      <pubDate>Wed, 04 Apr 2018 13:48:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-with-true-color-in-lisp/m-p/7907677#M106561</guid>
      <dc:creator>hak_vz</dc:creator>
      <dc:date>2018-04-04T13:48:45Z</dc:date>
    </item>
  </channel>
</rss>

