I can not get the line type to change.
Example: (MakeModifyLayer "VP" 5 "HIDDEN" 0 T 0 "Vport Boundary Layer")
Yes, the line type is loaded.
Thanks for any help.
;; Modified by CAB , apologies to Lee for the hack.
;; Make or Modify a layer
(defun MakeModifyLayer ( name colour linetype lineweight willplot bitflag description / ent elst layer)
;; © Lee Mac 2010
;; 06/14/2011 CAB added ability to modify existing layer data
(if (setq ent (tblobjname "LAYER" name))
(progn
(setq elst (entget ent)
elst (subst (cons 6 (if (and linetype (tblsearch "LTYPE" linetype))
linetype "CONTINUOUS")) (assoc 70 elst) elst)
elst (if (assoc 62 elst)
(subst (cons 62 (if (and colour (< 0 (abs colour) 256)) colour 7)) (assoc 62 elst) elst)
(append elst (list (cons 62 (if (and colour (< 0 (abs colour) 256)) colour 7))))
)
elst (if (assoc 70 elst) (subst (cons 70 bitflag) (assoc 70 elst) elst)
(append elst (list (cons 70 bitflag))))
elst (subst (cons 290 (if willplot 1 0)) (assoc 290 elst) elst)
elst (subst (cons 370
(if (minusp lineweight) -3
(fix
(* 100
(if (and lineweight (<= 0.0 lineweight 2.11)) lineweight 0.0)
)
)
)
)
(assoc 370 elst) elst)
)
(entmod elst)
(if (and description (setq layer (vlax-ename->vla-object ent)))
(if (vlax-property-available-p layer 'Description)
(vla-put-Description layer description)
)
)
)
(entmake
(append
(list
(cons 0 "LAYER")
(cons 100 "AcDbSymbolTableRecord")
(cons 100 "AcDbLayerTableRecord")
(cons 2 name)
(cons 70 bitflag)
(cons 290 (if willplot 1 0))
(cons 6
(if (and linetype (tblsearch "LTYPE" linetype))
linetype "CONTINUOUS"
)
)
(cons 62 (if (and colour (< 0 (abs colour) 256)) colour 7))
(cons 370
(if (minusp lineweight) -3
(fix
(* 100
(if (and lineweight (<= 0.0 lineweight 2.11)) lineweight 0.0)
)
)
)
)
)
(if description
(list
(list -3
(list "AcAecLayerStandard" (cons 1000 "") (cons 1000 description))
)
)
)
)
)
) ; endif
)