프로그램
캐드 분류

면적 리습 줄간격을 띄고 싶습니다 ㅜ~

컨텐츠 정보

  • 138 조회
  • 0 추천
  • 0 비추천
  • 목록

본문

안녕하세요
리습초보입니다… 여러곳에 검색해서 조합해서 수정하려고 했으나 안되서 글을 올리게 되었습니다.
현재 사용하고 있는 면적 리습인데 사용시 
"m2″랑 "평"이 겹쳐서 나와서 너무 불편한데…
아래와 같이 다음줄로 기입되게 하려면 어떤걸 수정해야되는지 알 수 있을까요??
"m2″
"평"
(defun c:000 (/ ss sno no py1 py2
               w x z tex1 txt2 etype
               num num1 num2 h h2
               pto )
  (setvar "cmdecho" 0)
  (prompt "n>> Select the Area Pline:") 
  (setq ss (ssget))
  (setq sno (sslength ss))
  (setq no 0)
  (setq num 0.0)
  (repeat sno
    (setq h (getvar "textsize"))
    (prompt "n  Text size ? ")
    (princ h)
    (princ "  ->: ")
    (setq z (getdist))
    (if z
       (setq h z )
     )
    (setq pto (getpoint "n Text Location ?"))
    (setq x (ssname ss no))
    (setq etype (cdr (assoc 0 (entget x))))
    (if (= etype "LWPOLYLINE")
        (progn
          (command ".area" "e" x)
          (setq num (getvar "area"))
          (setq num1 (* num 1e-6))
          (setq py1 (* num1 0.3025))
          (setq num2 (rtos num1 2 2))
          (setq py2 (rtos py1 2 2))
          (princ "n    :")
          (princ num2)
          (princ "M2/")
          (princ py2)
          (princ "PY")
          (princ "n Display the result ? : ")
          (setq tex1 (strcat num2 "㎡"))
          (setq tex2 (strcat " (" py2 "평)"))
          (setq w (strcase (getstring)))
          (if (or (= w "")(= w "y"))
              (command ".text" "j" "r" (setq z pto)(setq z h)(setq z 0.0)(setq z tex1)
                       ".text" (setq z pto)(setq z h)(setq z 0.0)(setq z tex2))
           );;if
         );;progn
    );;if
    (setq no (1+ no))
  );;repeat
  (setvar "cmdecho" 1)
  (setvar "blipmode" 0)
  (prin1)
)


추가로 혹시 지금 리습은 여러개 박스 선택 후 면적 계산할때 
텍스트 사이즈 -> 위치 -> 결과값 보여주기(?) Yes 를 매 박스마다 해줘야 되는데
처음에만 위에껄 적용하고 추후 박스들을 위치만 정해주는걸로 수정이 되는지도 궁금합니다~~!!

관련자료

댓글 0 / 1 페이지
등록된 댓글이 없습니다.
전체 6,913 / 1 페이지
번호
제목
이름

최근글


새댓글


알림 0