길이합 리습 오류 도와주세요ㅜㅜ
컨텐츠 정보
- 109 조회
- 2 댓글
- 0 추천
- 0 비추천
- 목록
본문
길이합 잘쓰다가 버전문제 인것 같긴 한데 다른거 찾아서 깔아봐도
실행이 안되요ㅠㅠ
급해서 꼭 좀 도와주시면 감사하겠습니다!!
(defun c:QQ (/ ent n dis ent_l #a #ad #as )
(setvar “cmdecho” 0)
(setq ent (ssget ‘((0 . “LINE,CIRCLE,ARC,POLYLINE,LWPOLYLINE,ELLIPSE,SPLINE”))))
(setq n 0 dis 0)
(repeat (sslength ent)
(setq ent_l (ssname ent n))
(command “lengthen” ent_l “”)
(setq dis (+ dis (GETVAR “PERIMETER”)))
(setq n (1+ n))
)
(setq #a(strcat “***** 선택 객체수 = “(rtos n)” 길이합계 = ” (rtos dis)))
(prompt (strcat “n” #a))
(vl-load-com)
(setq #ad(vla-get-activedocument(vlax-get-acad-object)))
(setq #as
(if (> (vla-get-activespace #ad) 0)
(vla-get-modelspace #ad)
(vla-get-paperspace #ad)
);;if
);;setq
(vla-addtext #as #a (vlax-3d-point(getpoint “n≫≫≫Pick text point:”))(* (getvar “textsize”)1.0))
(mapcar ‘vlax-release-object (list #as #ad))
(princ)
(setvar “cmdecho” 1)
)
;라인의 두께를 주는 명령어
(defun c:w2()
(setvar “CMDECHO” 0)
(setq sset (ssget))
(command “undo” “be”)
(if sset
(progn
(if (= thk nil)
(setq thk 0.1)
)
(setq msg (strcat “n>두께를 주세요 <” (rtos thk 2 2) “> : “))
(princ msg)
(if (setq tmp (getreal))
(setq thk tmp)
)
(setq sslen (sslength sset))
(while (> sslen 0)
(setq ent (entget
(setq entname (ssname sset (setq sslen (1- sslen))))
)
ename (cdr (assoc 0 ent))
)
(cond
((or (= ename “LINE”) (= ename “ARC”))
(command “pedit” entname “y” “w” thk “”)
(princ “#”)
)
((= ename “LWPOLYLINE”)
(command “pedit” entname “w” thk “”)
(princ “#”)
)
)
)
)
)
(command “undo” “e”)
(princ)
)