https://www.cadtutor.net/forum/topic/74514-text-concatenate-lisp-editing/
Text concatenate LISP editing
Hello, I use a LIPS found here (https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/text-concatenate/m-p/5819272/highlight/true#M335121) to merge / concatenate texts from a plan, then l copy paste this in Excel to make tables with data (coordin
www.cadtutor.net
(defun c:conc (/ a ans b c d e f g h j)
(graphscr)
(command ".redraw") (command)
(initget "Yes No")
(if (= "Yes" (getkword "\nRetain Append Text? [Y/N] <N>: "))
(setq j 0); Yes
(setq j 1); No
)
(prompt "\nSelect Text to Remain->")
(setq a (entsel))
(while (setq b (entsel "\nSelect Text to Append -> "))
(setq c (entget (car a))
d (entget (car b))
e (cdr (assoc 1 c)) ;get 1st text string
f (cdr (assoc 1 d)) ;get 2nd text string
g (strcat e "," f)
h (subst (cons 1 g) (assoc 1 c) c)
)
(entmod h) ;update 1st string
(if (eq j 1)
(entdel (car b))
)
(princ)
)
)
'autocad' 카테고리의 다른 글
Pdf 출력 후 문자 주위로 상자 보이는 문제 (0) | 2025.01.10 |
---|---|
간단하게 리스트 내 요소들을 연산 (0) | 2024.12.19 |
Parse Numbers; Get string from *TEXT (0) | 2024.12.13 |
따옴표를 리습 함수에서 사용하기 (2) | 2024.09.26 |
To change true color to ACI(AutoCAD Color Index) of Layers (0) | 2024.08.29 |