;;; 02.Dezember.2004 ; Rolf "Benwisch" Wischnewski (www.benwisch.de) ;;; Programmname(n): ** c:pick2pick ** ;;; AUFRUF AUS AUTOCAD MIT -> pick2pick ;;; Liste der verwendeten Funktionen ;;; -------------------------------- ;;; BW_ETYPE< ;;; BW_SUBST>LST ;;; PICK>TA ;;; -------------------------------------------- ;;; Gesamtanzahl der verwendeten Funktionen: 3 ;;; -------------------------------------------- (defun c:pick2pick (/ destination source bw_etype< bw_subst>lst pick>ta) ;;; --------------------- ;;; ×× LOCAL FUNCTIONS ×× ;;; --------------------- (defun bw_etype< (#ent) (if #ent (cdr (assoc 0 (if (= (quote ename) (type #ent)) (entget #ent) #ent ) ) ) ) ) ;;;××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××× (defun bw_subst>lst (#lst-of-dotpair #elst /) (mapcar (function (lambda (pair) (cond ((assoc (car pair) #lst-of-dotpair)) (pair) ) ) ) #elst ) ) ;;;××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××× (defun pick>ta () ((lambda (entity) (if (and (member (bw_etype< entity) (quote ("TEXT" "MTEXT" "ATTRIB")) ) (not (assoc 3 (entget entity))) ) entity ) ) (car (nentsel "\nText oder Attribut wählen : ")) ) ) ;;;××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××× ;;; ----------------------- ;;; ×× END OF FUNCTIONS ×× ;;; ----------------------- ;;; < BODY > (while (quote t) (while (null (setq source (pick>ta)))) (redraw source 3) (while (null (setq destination (pick>ta)))) (redraw source 4) (entmod (bw_subst>lst (list (assoc 1 (entget source))) (entget destination) ) ) (entupd destination) ) (prin1) ;;; < BODY > ) (princ)