Sorry I misunderstood. rather then building an entget list and using entmod. I just used vla-put to update layer if existing. entmakex if not existing.
;; Creates a new layer or updates an existing one if it exists.
;; Will attempt to load the linetype if found in the acad*.lin file and if the layer exists, it will update the properties.
;; Code by ronjonp, taken from: https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-layer-with-true-color-in-lisp/m-p/7904814#M367339
;; Usage:
;; (_addOrUpdateLayer "NewLayerName" '(69 69 69) "3Dash2" 1 "Description goes here")
;; (_addOrUpdateLayer "NewLayerName2" 169 "3Dash2" 0 "Description goes here")
;; NOTE:
;; The 0 or 1 in examples above is for plot on = 1 or plot off = 0.
;; Modified by 3dwannab on 2022.06.11 to add description to the function.
(defun _addOrUpdateLayer (name color ltype plot desc / _loadlinetype _rgb _setLayDescription 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))
)
)
)
(if (tblsearch "layer" name)
(progn
(setq layerobj (vla-add (vla-get-layers (vla-get-activedocument (vlax-get-acad-object))) name))
(vla-put-Color layerobj color)
(vla-put-linetype layerobj (if (_loadlinetype ltype) ltype "continuous"))
(cond
((eq plot 0)
(vla-put-plottable layerobj :vlax-false)
)
((eq plot 1)
(vla-put-plottable layerobj :vlax-true)
)
)
(vla-put-description layerobj desc)
)
(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
)
)
)
)
maybe @ronjonp can explain/fix the entmod.