46 lines
1.1 KiB
Common Lisp
46 lines
1.1 KiB
Common Lisp
(Defun C:O2LA ()
|
|
(Setvar "Cmdecho" 0)
|
|
(Setq A (SSget))
|
|
(If
|
|
A
|
|
(Progn
|
|
(Setq B (Getstring "\nName of the Target-Layer: "))
|
|
; (Setq farbe (Getstring "\nTarget-Color: "))
|
|
(If
|
|
(= nil (Tblsearch "Layer" B))
|
|
(Progn
|
|
(Princ (Strcat "\nLayer " B " do not exist!"))
|
|
(Initget 1 "J N")
|
|
(Setq C (Getkword "\nMake a new layer ? (Y/N): "))
|
|
(If
|
|
(= "Y" C)
|
|
(Command "_Layer" "_New" B "" "_change" A "" "_prop" "_LA" B "")
|
|
)
|
|
)
|
|
(Command "_change" A "" "_prop" "_LA" B "")
|
|
; (Command "_change" A "_prop" "_color" farbe "")
|
|
)
|
|
)
|
|
)
|
|
(Princ)
|
|
)
|
|
|
|
(Defun C:O2LB ()
|
|
(Setvar "Cmdecho" 0)
|
|
(Setq A (SSget))
|
|
(If
|
|
A
|
|
(Progn
|
|
(Setq B (Entsel "\nSelect object on the Target-Layer: "))
|
|
(If
|
|
B
|
|
(Progn
|
|
(Setq B (Cdr (Assoc 8 (Entget (Car B)))))
|
|
(Command "_change" A "" "_prop" "_LA" B "")
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(Princ)
|
|
)
|
|
|