역시 AI 가 코딩이라니...
대단합니다. Lisp 도사분들이 많아 웬만하면 거의 다 개발되어 있는데...
없으면 만들어 주기까지 하는 군요. google AI 대단하닷...
🔎 count layers in acad by lisp: Google 검색
www.google.com
(vl-load-com) ; Ensure ActiveX functions are available
(defun c:CountLayers ( / doc count)
(setq doc (vla-get-ActiveDocument (vlax-get-acad-object))) ; Get the active document
(setq count (vla-get-Count (vla-get-Layers doc))) ; Get the count of layers
(alert (strcat "There are " (itoa count) " layer(s) in the drawing.")) ; Display the result
(princ) ; Exit the command cleanly
)
이젠 Visual Lisp으로 넘어가야 겠군요.
반응형
'autocad' 카테고리의 다른 글
| Update ALL Xrefs (0) | 2025.10.01 |
|---|---|
| Erase Layers of REV. and Entities in Title blocks (0) | 2025.10.01 |
| 대화상자 끄기. DialogBox_OFF (0) | 2025.09.12 |
| Remove item in the LIST (0) | 2025.09.10 |
| 선택한 것들 bylayer 색상, '0' 레이어로 변경 (SUBST multi CONS) (0) | 2025.09.09 |