AutoLISP Code : object->Layer

;;; Function: objet->layer ;
;;;--------------------------------------------------------------------;
;;; Description: This function takes an object and forward ;
;;; it to the choosen layer. ;
;;;
;
;;;------------------------------------------------------------------- ;

(defun objet->layer (Layername / list)
(setq list (entget (entlast)))
(setq list (subst (cons 8 Layername) (assoc 8 list) list))
(entmod list)

)

No comments:

Post a Comment