(defun c:aq (/ TEXT-TO-COPY TEXT_TO_CHANGE its-a-dim)
(setq TEXT-TO-COPY nil)
(setq TEXT_TO_CHANGE nil)
(setq its-a-dim nil)
(setvar “cmdecho” 0)
(command “_.UNDO” “_Group”)
;-selects objects to be COPIED
(WHILE (= TEXT-TO-COPY NIL)
(SETQ TEXT-TO-COPY (NENTSEL “nSelect attrib or text:”))
;-error chk
(IF (= TEXT-TO-COPY NIL)
(ALERT “Please select text or attrib…..”)
) ;-End of if statement
) ;-End of while statement
(IF (/= NIL TEXT-TO-COPY)
(SETQ TEXT-TO-COPY-INFO (ENTGET (CAR TEXT-TO-COPY)))
) ;-End of if statement
(REDRAW (CDR (ASSOC -1 TEXT-TO-COPY-INFO)) 3)
;-selects objects to be changed
(SETQ TEXT_TO_CHANGE
(NENTSEL “nSelect TARGET attrib or text, or [Enter] for multiple copies”)
) ;_ end of SETQ
;-If user presses enter the program goes into a while loop
; to select muliple objects
(if (= TEXT_TO_CHANGE nil)
(progn (SETQ TEXT_TO_CHANGE 1)
(WHILE TEXT_TO_CHANGE
(SETQ TEXT_TO_CHANGE (NENTSEL))
(text_check)
(if its-a-dim
(change_dim)
) ;_ end of if
(if (not its-a-dim)
(progn
(setq REGEN_NAME TEXT_TO_CHANGE)
(IF (= (length REGEN_NAME) 4)
(SETQ REGEN_NAME (CADDDR REGEN_NAME))
) ;_ end of IF
(SETQ TEXT_TO_CHANGE (ENTGET (CAR TEXT_TO_CHANGE)))
(setq TEXT_TO_CHANGE
(subst (assoc 1 TEXT-TO-COPY-INFO)
(assoc 1 TEXT_TO_CHANGE)
TEXT_TO_CHANGE
) ;_ end of subst
) ;_ end of setq
(entmod TEXT_TO_CHANGE)
(entupd (car REGEN_NAME))
) ;_ end of progn
) ;_ end of WHILE
) ;_ end of progn
) ;_ end of if
) ;-end of while loop
;-changes a single object
(if (/= TEXT_TO_CHANGE nil)
(progn (text_check)
(if its-a-dim
(change_dim)
) ;_ end of if
(if (not its-a-dim)
(progn
(setq REGEN_NAME TEXT_TO_CHANGE)
(IF (= (length REGEN_NAME) 4)
(SETQ REGEN_NAME (CADDDR REGEN_NAME))
) ;_ end of IF
(PROGN
(SETQ TEXT_TO_CHANGE (ENTGET (CAR TEXT_TO_CHANGE)))
) ;_ end of PROGN
(setq TEXT_TO_CHANGE
(subst (assoc 1 TEXT-TO-COPY-INFO)
(assoc 1 TEXT_TO_CHANGE)
TEXT_TO_CHANGE
) ;_ end of subst
) ;_ end of setq
(entmod TEXT_TO_CHANGE)
(entupd (car REGEN_NAME))
) ;_ end of progn
) ;_ end of if
) ;_ end of progn
) ;-end of single change
(command “_.UNDO” “End”)
(REDRAW (CDR (ASSOC -1 TEXT-TO-COPY-INFO)) 4)
(PRINC)
) ;_ end of defun
(princ “nAttribute Copy 2.0 written by Clinton Cogswell at cmcadd.com….”)
(princ “ntAC (Attribute/copy) loaded. Start command with AC.”)
;|첲isual LISP?Format Options?
(96 2 1 2 T “end of ” 80 9 0 0 2 nil T nil T)
;*** DO NOT add text below the comment! ***|;
;*********************************************
위의 리습은 일반 text 내용을 속성블럭안에 있는 text에 넣어주는 기능이 되는건데요
편리한 기능이기에 받았는데 뭐가 문제인지 제 컴에서 안되서요…부탁드려요~~