Hello everyone,

I need some help to get this code to work.

I am looking for it to allow me to select a layer and then make it nonplot.

After I run it, I get this in the command line "Pick the layer to make nonprint: ; error: too many arguments" and the layer that I have pick has not be set to nonplot.

Code:
(DEFUN C:NP ()(SETVAR "CMDECHO" 0)
        (setq ent_name (car (entsel "\nPick the layer to make nonprint: ")))
    (setq ent_list (entget ent_name))     
    (setq l_name (cdr (assoc 8 ent_list)))  
    (setvar "-LAYER" "PLOT" "N" l_name)   
        (SETVAR "CMDECHO" 1)(princ))
Thanks.