다음에 LM 리습과같이
선, 폴리선은
1+2+3+4= 10 4ea 가 나오는데
치수리습은 총합계만 나오는 dnm 리습밖에 없어서
산출 근거자료가 부족해지는 문제가 생기더라고요.
혹시 치수선의 LM 리습에 대해 문의드려요.
———————————————–
이젠 길거리 가게에서도 캐롤~송이 들려오지도 않고,
2주 전, 토요일에 광화문 가는데, 차들이 많이 막혀서
차창밖으로 들려오는 수많은 인파의 물결, 촛불집회…
———————————————–
상큼멜론님 항상 좋은 답변 감사드립니다..
덕분에 작업의 효율이 나날이 높아 지고 있습니다.
그런데 자그마한 문제지만 업무상의 문제점이 생기더군요…
적산시 고려전산 FIN파일 입력시 mm 단위가 아닌 m 의 소수점 2자리수로 넣는데,
그것을 수정하려하다보니 FAS 파일이라 변환이 안되네요… 혹시 이부분도 부탁드려도 될까요>?
그리고 LM 의 리습의 변환의 입장이라… LN 으로 명령어를 바꿀수 있는지 부탁드려요.
——————————————————————————————————————————–
리습이 안올려 지네요.
이게 기존의 치수선의 총합계만 나오는것이고요.
——————————————————————————————————————————-
;; http://cafe.daum.net/archimore
;; 아키모아 운영진 “행복한하루”
(defun c:dnm(/ lts th ss k sum ed x42)
(setq lts (getvar “ltscale”))
(setq th (* lts 3))
(setq ss (ssget (list (cons 0 “dimension”))))
(setq k 0)
(setq sum 0)
(repeat (sslength ss)
(setq ed (entget (ssname ss k)))
(setq x42 (cdr (assoc 42 ed)))
(setq sum (+ sum x42))
(setq k (1+ k))
)
(setq sum (rtos sum 2 2))
(command “text” (getpoint “n텍스트위치클릭:”) th “” sum)
(princ)
)
—————————————————————————————————————————
이게 LM 입니다. 참고용 파일이요.
———————————————————————————————————————–
(defun c:Lm (/ ss sslist i index linelist linenumlist ent old10 old11 dist lnum count temp total total1 subtotal txt pt)
;—->total1 추가함
(princ “n Eltity Length Sum”)
(setvar “cmdecho” 0)
(setq ss (ssget (list (cons 0 “LINE,CIRCLE,ARC,POLYLINE,LWPOLYLINE,ELLIPSE,SPLINE”))))
(if ss
(progn
(setq index 0)
(setq linelist nil)
(setq linenumlist nil)
(repeat (sslength ss)
(setq ent (ssname ss index))
(command-s “lengthen” ent “” “” “”)
(setq dist (GETVAR “PERIMETER”))
(if (apply ‘or (mapcar ‘(lambda (x) (equal dist x 1)) linelist))
(progn
(setq temp 0)
(setq lnum nil)
(foreach x linelist
(if (equal dist x 1)
(setq lnum temp)
)
(setq temp (1+ temp))
)
(setq count 0)
(setq temp nil)
(foreach x linenumlist
(if (= count lnum)
(setq temp (append temp (list (+ x 1))))
(setq temp (append temp (list x)))
)
(setq count (1+ count))
)
(setq linenumlist temp)
)
(progn
(setq linelist (append linelist (list dist)))
(setq linenumlist (append linenumlist (list 1)))
)
)
(setq index (1+ index))
)
(setq txt “”)
(setq count 0)
(setq total 0)
(setq subtotal 0)
(repeat (length linelist)
(if (= count 0)
(if (> (nth count linenumlist) 1)
;;;;(setq txt (strcat (rtos (/ (nth count linelist) 1.0) 2 2) “*” (rtos (nth count linenumlist) 2 0) ))
;;;;(setq txt (strcat (rtos (/ (nth count linelist) 1.0) 2 2)))
(setq txt (strcat (rtos (/ (nth count linelist) 1000.0) 2 2) “*” (rtos (nth count linenumlist) 2 0) ))
(setq txt (strcat (rtos (/ (nth count linelist) 1000.0) 2 2)))
)
(if (> (nth count linenumlist) 1)
;;;;(setq txt (strcat txt ” + ” (rtos (/ (nth count linelist) 1.0) 2 2) “*” (rtos (nth count linenumlist) 2 0) ))
;;;;(setq txt (strcat txt ” + ” (rtos (/ (nth count linelist) 1.0) 2 2)))
(setq txt (strcat txt ” + ” (rtos (/ (nth count linelist) 1000.0) 2 2) “*” (rtos (nth count linenumlist) 2 0) ))
(setq txt (strcat txt ” + ” (rtos (/ (nth count linelist) 1000.0) 2 2)))
)
)
(setq subtotal (* (/ (nth count linelist) 1) (nth count linenumlist)))
(setq total (+ subtotal total))
(setq total1 (/ total 1000));————->추가함
(setq count (1+ count))
)
;;;;(setq txt (strcat txt ” = ” (rtos total 2 2) “m”))
(setq txt (strcat txt ” = ” (rtos total1 2 2) “m”));——->total에서 total1 변경함
(setq txt (strcat txt ” : 개소 ” (rtos (length linelist) 2 +0) ” 개”))
(princ txt)
(if (not (setq tth (getreal (strcat “n현재 TextSize : <” (rtos(getvar “textsize”) 2 1) “> 입니다. 원하는 Text 크기를 입력하세요 : “))))
(setq tth (getvar “textsize”))
(setvar “textsize” tth)
)
(setq pt (getpoint “n 텍스트 삽입점 : “))
(if pt (command “text” pt “” “” txt))
)
)
(princ)
)
——————————————————————————————————————–