;; free lisp from cadviet.com
;;; this lisp was downloaded from
https://www.cadviet.com/forum/topic/31222-lisp-chuy%E1%BB%83n-layer/ (Defun c:x11 ( )
(Prompt "\nChon doi tuong muon chuyen lop...")
(Setq chuyen (Ssget))
(command "chprop" chuyen "" "la" "daoduongcu" "")
(Princ)
)
(defun c:x1 () (vl-cmdf "clayer" "DEFPOINTS" ))
(defun layset (/ LAY) (setvar "cmdecho" 0)
(setq LAY (entsel "\nChon doi tuong cho Layer hien hanh : "))
(if LAY (progn
(setq LAY (cdr (assoc 8 (entget (car LAY)))))
(command "_.layer" "set" LAY "") (princ (strcat "\nLayer : " LAY " da la hien hanh.")) )
(progn
(if (not ddlop) (load "ddlop")) (if (setq LAY (ddlop))
(progn
(command "_.LAYER" "ON" LAY "THAW" LAY "SET" LAY "") (princ (strcat "\nLayer : " LAY " da la hien hanh.")) ) ) ) )(princ) )
(defun c:cgg () (layset))