(defun c:cnla( / ent_name lay)
  ; Print nested object real layer and copy its name to clipboard
  (if (setq ent_name (car (nentsel "\nSelect object to know layer: ")))
    (progn
      (setq lay (DT:nla ent_name))
      (princ
        (strcat
          "\nDXF Layer = " lay
          " (colour " (itoa (cdr (assoc 62 (tblsearch "layer" lay)))) ")"
        )
      )
     (CopyToClipboard lay)
    ); END progn
  ); END if
  (princ)

  v0.0 - 2017 . ? ? . ? ? - First issue
  Author :  
  Last revision : 2017 . ? ? . ? ?
);END defun
(defun DT:nla (ent_name / lay)
  ; Returns nested object's layer name
  (if (/= ent_name nil)
    (progn
      (mapcar
        '(lambda (x)
            (if (= (car x) 8) (setq lay (cdr x)) )
          ); END lambda
        (entget ent_name '("*"))
      );END mapcar)
      (setq lay lay)
    );END progn
  );END if

  v0.0 - 2017 . ? ? . ? ? - First issue
  Author :  
  Last revision : 2017 . ? ? . ? ?
);END defun

 Print nested object real layer and copy its name to clipboard
 END progn
 END if
END defun
 Returns nested object's layer name
 END lambda
END mapcar)
END progn
END if
END defun
(defun c:cnla( / ent_name lay)
  (if (setq ent_name (car (nentsel "\nSelect object to know layer: ")))
    (progn
      (setq lay (DT:nla ent_name))
      (princ
        (strcat
          "\nDXF Layer = " lay
          " (colour " (itoa (cdr (assoc 62 (tblsearch "layer" lay)))) ")"
        )
      )
     (CopyToClipboard lay)
  (princ)

  v0.0 - 2017 . ? ? . ? ? - First issue
  Author :  
  Last revision : 2017 . ? ? . ? ?
(defun DT:nla (ent_name / lay)
  (if (/= ent_name nil)
    (progn
      (mapcar
        '(lambda (x)
            (if (= (car x) 8) (setq lay (cdr x)) )
        (entget ent_name '("*"))
      (setq lay lay)

  v0.0 - 2017 . ? ? . ? ? - First issue
  Author :  
  Last revision : 2017 . ? ? . ? ?
