프로그램
캐드 분류

리습수정부탁드립니다.<br>리습수정부탁드립니다…<br>리습수정부탁드립니다<br>리습수정부탁드립니다<br>리습수정부탁드립니다^^<br>리습수정부탁드립니다.^^<br>리습수정부탁드립니다.<br>리습수정부탁드립니다<br>리습수정부탁드립니다..<br>리습수정부탁드립니다.<br>리습수정부탁드립니다..<br>리습수정부탁드립니다<br>리습수정부탁드립니다…

컨텐츠 정보

  • 197 조회
  • 3 댓글
  • 0 추천
  • 0 비추천
  • 목록

본문

현재 면적구하는 리습을 다운로드 받앗서 사용중입니다.

 m2 단위로 산출되는 리습인데.
이 리습을 ha(헥타르 단위)로 나오게 바꾸고싶습니다. 수정 부탁드립니다.!!!
1ha=10000m2 

다운받다 사용중인 면적,길이 리습 보완 부탁드립니다…
 1. 현재는 폴리라인 그리는 리습사용후 다시 면적리습을 실행 하는데 
 2. 첨부한 리습을 보완하여 내부선택시 안쪽선을 따라 폴리라인 그린후 면적 및  길이 산출을 1개의 리습으로 사용하고 싶습니다…
     추가로 소수점 기준으로 자리수를 맞추고 싶습니다…
  현재 아래같이 나옵니다….
  19.13M2                                         
    22.89M                        
     5.79PY
 


  도움 주시면 감사합니다….

 (defun c:aaa ( / doc space ss index obj mi mx minpt maxpt inspt area txtobj)
  (setq doc (vla-get-activedocument (vlax-get-acad-object)))
  (cond
    ((= (vla-get-activespace doc) 1) (setq space (vla-get-modelspace doc)))
    ((= (vla-get-activespace doc) 0) (setq space (vla-get-paperspace doc)))
    )
  (if (and (setq ss (car (entsel "n객체 선택 : "))) (setq inspt (getpoint "n텍스트 삽입점 지정 : ")))
    (progn
      (setq obj (vlax-ename->vla-object ss))
      (setq area (vla-get-area obj) len (vlax-curve-getdistatparam obj (vlax-curve-getendparam obj)))
      (mapcar '(lambda (a b)
   (setq p (vlax-3d-point inspt))
   (setq txtobj (vla-addtext space (strcat a b) p 200));<—문자크기;
   (vla-put-alignment txtobj 8)
   (vla-put-textalignmentpoint txtobj p)
   (setq inspt (polar inspt (/ (* 270 pi) 180) 400));<—줄간격;
   )
       (list (rtos (/ area 1000000.) 2 2) (rtos (/ len 1000.) 2 2)
 (rtos (* area 0.000001 0.3025) 2 2)) '("m2″ "m" "py")
       )
      )
    )
  (princ)
  )
(vl-load-com)
(prompt "n[ AAA ]")
(princ)


첨부된리습은 기준선에서 치수기입하면 양쪽으로 옵셋 되는 리습이 포함 되어 있는것입니다
근데 저는 양쪽옵셋되면서 기준선은 사라졌으면 하는 리습을 원합니다
고수님들 부탁드립니다…ㅠㅠ


m2당 나무수량 구하는 리습인데 면적리습처럼 도면에 숫자까지 써지는걸로 수정 부탁드립니다


/가/나/다/라/마/바/사

라는 하나의 텍스트를 /기준으로 각각의 레이어별로 나눠서 뿌려주는 리습입니다..
그런데 지정해놓은 레이어의 텍스트가 없을 경우에 에러가 뜹니다..
지정한 레이어의 텍스트가 없으면 그냥 끝내는 걸로 수정좀 부탁드립니다 

리습초짜라 잘모르겠네여..

예전 리습파일 올렸는데 뭘 수정해야 할지 모르겠읍니다

(문자는 우에서 좌로, 아래에서 위로 수정했으면 하네여).. 현재 리습 반대로요

리습은 순차적인 숫자증감입니다.

수정파일이나…양식 부탁드립니다.


1. d드라이브 안에 있는 것중 원하는데이터를 insert하고싶은데. 안돼네요~
틀린건 없는것 같은데.. 함 확인해주세요
2. map사용자들이 주로 쓰는 한꺼번에 자르는 리습인데요..
이걸 바운다리를 자동으로 잡아서 자르게 하고싶은데.. 그게 안돼요~
샘풀을 함께 올립니다. 함 봐주세요~~감사합니다.


안녕하세요….
첨부한 리습은 인터넷에서 다운받아 짜집기한 것 입니다.
내용은 :
한개의 파일에 있는 여러장의 도면을 한장씩 더블블럭하여 원점(0,0)에 특정점(도면의 좌측 하단: 이점은 선택함) 을 위치시키는 것 입니다…
그런데 중요한 것은 도면 한장한장을 원점에 위치시키면서 zoom 상태를 extend 시켜서 저장해야 합니다.
잘 아시는 분의 도움이 필요해서 요청드립니다,….어디를 수정해야 할지…


2002버전에서는 되는데 2006버전에서는 안됩니다..

명령: pick point :; 오류: AutoCAD 변수 설정이 거부됨: "cecolor" "green"

이러면서 명령어 실행이 안됩니다..
리습 수정 부탁드려도 될는지요…..


(defun c:le(/ test)

(setq test (getstring "n찾을값 : "))
(sslength (ssget "x" '((0 . "TEXT")(1 . test))))

)
문자중에서 제가 원하는 것만 찾으려고 하는데요..
test라는 변수에 값을 받아서 test에 입력된 값을 가진 문자들의 갯수를 찾으려고 하는데 속성에서 test라는 변수를 받아들이지를 않네요.
수정 부탁 좀 드립니다.


목차 만드는 리습인데요..
어설픈 실력으로 이것저것 만져 보니 안되네요..==
2002에서는 사용이 되는데..2006에서는 안됩니다..수정좀 해 주시면 고맙겠습니다..

;*******************************************
; Program : 목 차
; By Kwan-Soo Song
; 1999. 8. 30.
;*******************************************

(DEFUN C:mok()

(setq lin 24) ; 열당 기본 줄수

(setq xl1 60) ; 번호
(setq xl2 200) ; 도면명
(setq xl3 50) ; 매수
(setq xl4 80) ; 일련번호
(setq yl 20) ; 기본줄높이
(setq scl 0.45) ; 줄높이에 대한 글자의 크기 비

(command "style" "ghs" "굴림" (* yl scl) "1.0″ "0.0″ "N" "N" "N")
(setvar "cmdecho" 0)
(setvar "blipmode" 0)
(setvar "osmode" 0)

;********** data의 file을 읽음 ************

(setq fn (getfiled "input data file" "" "mok" 0))

(setq pnt (getpoint "pick point :"))
(setq x0 (car pnt))
(setq y0 (cadr pnt))

(setq opf (open fn "r"))

;**** data의 line 수를 인식하여 몇열로 할것인가를 결정 ****

(setq line_n 2)
(setq a1 (read-line opf))
(while (/= a1 nil)
(setq line_n (1+ line_n))
(setq a1 (read-line opf))
)
(close opf)

(cond
((<= line_n lin) (setq yul 1))
((> line_n lin) (setq yul 2))
)

;**** 열수에 따른 줄높이,칸넓이 결정 ****

(if (> line_n lin) (setq line_n (atoi (rtos (+ (/ line_n 2) 0.5) 2 0))

))

;—–줄높이 결정——-
(if (and (= yul 2)(> line_n lin))
(setq yl (/ (* lin yl) line_n))
)

;—–칸넓이 결정——-
;(if (= yul 2)
; (progn
; (setq xl1 xl3)
; (setq xl2 (/ (* xl2 3) 4))
; )
????

;********* data를 읽고 작도 *********

(setq opf (open fn "r"))
(setq a1 (read-line opf))

(setq strl (strlen a1))
(setq num 0) ; page number

(setq xl_total (+ xl1 xl2 xl3 xl4 (/ yl 5)))

;—–세로의 line좌표 결정——-
(setq x1 (+ x0 xl1)
x2 (+ x1 xl2)
x3 (+ x2 xl3)
x4 (+ x3 xl4)
)

(setq pnt1 (list x1 y0)
pnt2 (list x2 y0)
pnt3 (list x3 y0)
pnt4 (list x4 y0)
)

;—–제목의 위치 결정——-
(setq x1_title (+ x0 (/ xl1 2))
x2_title (+ x1 (/ xl2 2))
x3_title (+ x2 (/ xl3 2))
x4_title (+ x3 (/ xl4 2))
)
(setq y_title (- y0 (/ yl 2)))

(setq pt1 (list x1_title y_title)
pt2 (list x2_title y_title)
pt3 (list x3_title y_title)
pt4 (list x4_title y_title)
)

;—–도면명 첫문자및 마지막문자의 위치 결정——-
(setq x_txts (+ x1 yl)
x_txte (- x2 yl)
)

(setq y_txt (- y_title yl))

;—–제목줄 작도——-

(setvar "cecolor" "green")

(command "line" pnt pnt4 "")

(setq y0 (- y0 yl))
(setq pnt10 (list x0 y0)
pnt11 (list x1 y0)
pnt12 (list x2 y0)
pnt13 (list x3 y0)
pnt14 (list x4 y0)
)

(command "line" pnt pnt10 "")
(command "line" pnt1 pnt11 "")
(command "line" pnt2 pnt12 "")
(command "line" pnt3 pnt13 "")
(command "line" pnt4 pnt14 "")
(command "line" pnt10 pnt14 "")

(setvar "cecolor" "yellow")

(command "text" "mc" pt1 "" "번 호")
(command "text" "mc" pt2 "" "도 면 명")
(command "text" "mc" pt3 "" "매수")
(command "text" "mc" pt4 "" "일련번호")

;=========== data 를 읽고 작도시작 ==========

(setq bunho 1)
(setq nume 0)
(setq line_nn 0)
(while (/= a1 nil)

(setq pnt (list x0 y0))

(setq x_txts (+ x1 yl))
(setq strl (strlen a1))

;—–구분자(,)로 도면명과 매수를 분리——-

(setq count 1)
(setq subt (substr a1 count 1))

(while (/= subt ",")
(setq count (1+ count))
(setq subt (substr a1 count 1))
)

(setq txtn (- count 1))

;—–한글과 영문을 구분하여 문자수 얻기——-

(setq cut 1)
(setq eng 0)
(setq han 0)

(while (>= txtn cut)
(setq subt (substr a1 cut 1))
(setq string (ascii subt))
(cond
((< string 40)
(progn
(setq han (+ han 1))
(setq cut (+ cut 2))
)
)
((< string 42)
(progn
(setq eng (+ eng 1))
(setq cut (+ cut 1))
)
)
((< string 48)
(progn
(setq HAN (+ han 1))
(setq cut (+ cut 2))
)
)
((< string 58)
(progn
(setq eng (+ eng 1))
(setq cut (+ cut 1))
)
)
((< string 65)
(progn
(setq han (+ han 1))
(setq cut (+ cut 2))
)
)
((< string 91)
(progn
(setq eng (+ eng 1))
(setq cut (+ cut 1))
)
)
((< string 97)
(progn
(setq han (+ han 1))
(setq cut (+ cut 2))
)
)
((< string 123)
(progn
(setq eng (+ eng 1))
(setq cut (+ cut 1))
)
)
((>= string 123)
(progn
(setq han (+ han 1))
(setq cut (+ cut 2))
)
)
) ; end of cond
) ; end of while
(setq txtnum (- (+ han eng) 1))

;—–한자씩 읽고 쓰기——-

(setq www(/ (- x_txte x_txts) txtnum))

(setq cut 1)
(setq zzz 0)

(while (>= txtn cut)
(setq subt (substr a1 cut 1))
(setq string (ascii subt))
(cond
((< string 40)
(progn
(setq subt (substr a1 cut 2))
(setq cut (+ cut 2))
(setq zzz (+ zzz 1))
)
)
((< string 42)
(progn
(setq subt (substr a1 cut 1))
(setq cut (+ cut 1))
(setq zzz (+ zzz 1))
)
)
((< string 48)
(progn
(setq subt (substr a1 cut 2))
(setq cut (+ cut 2))
(setq zzz (+ zzz 1))
)
)
((< string 58)
(progn
(setq subt (substr a1 cut 1))
(setq cut (+ cut 1))
(setq zzz (+ zzz 1))
)
)
((< string 65)
(progn
(setq subt (substr a1 cut 2))
(setq cut (+ cut 2))
(setq zzz (+ zzz 1))
)
)
((< string 91)
(progn
(setq subt (substr a1 cut 1))
(setq cut (+ cut 1))
(setq zzz (+ zzz 1))
)
)
((< string 97)
(progn
(setq subt (substr a1 cut 2))
(setq cut (+ cut 2))
(setq zzz (+ zzz 1))
)
)
((< string 123)
(progn
(setq subt (substr a1 cut 1))
(setq cut (+ cut 1))
(setq zzz (+ zzz 1))
)
)
((>= string 123)
(progn
(setq subt (substr a1 cut 2))
(setq cut (+ cut 2))
(setq zzz (+ zzz 1))
)
)
) ; end of cond

(if (> zzz 1) (setq x_txts (+ x_txts www)))

(setq pt (list x_txts y_txt))

(setvar "cecolor" "yellow")
(command "text" "mc" pt "" subt)

) ; end of while

;—–일련번호의 결정——-

(setq pagen (+ count 1))

(setq page (atoi (substr a1 pagen (- strl count)))) ;page =

매수

(if (> page 1)
(progn
(setq nums (+ nume 1))
(setq numst (itoa nums))
(setq nume (+ nume page))
(setq numet (itoa nume))
(setq ilr (strcat numst "-" numet))
)

(progn
(setq nume (+ nume page))
(setq ilr (itoa nume))
)
) ; end of if

(setq pt1 (list x1_title y_txt)
pt3 (list x3_title y_txt)
pt4 (list x4_title y_txt)
)

(command "text" "mc" pt1 "" bunho)
(command "text" "mc" pt3 "" page)
(command "text" "mc" pt4 "" ilr)

(setq y_txt (- y_txt yl))
(setq y0 (- y0 yl))

(setq x1 (+ x0 xl1)
x2 (+ x1 xl2)
x3 (+ x2 xl3)
x4 (+ x3 xl4)
)

(setq pnt0 pnt10
pnt1 pnt11
pnt2 pnt12
pnt3 pnt13
pnt4 pnt14
)

(setq pnt10 (list x0 y0)
pnt11 (list x1 y0)
pnt12 (list x2 y0)
pnt13 (list x3 y0)
pnt14 (list x4 y0)
)

(setq a1 (read-line opf))

(setq bunho (1+ bunho))

(setvar "cecolor" "green")

(command "line" pnt pnt10 "")
(command "line" pnt1 pnt11 "")
(command "line" pnt2 pnt12 "")
(command "line" pnt3 pnt13 "")
(command "line" pnt4 pnt14 "")
(command "line" pnt10 pnt14 "")

(setq line_nn (1+ line_nn))

(if (= line_nn line_n)
(progn
(setq x0 (+ x0 xl_total))
(setq y0 (+ y0 (* (+ line_nn 1) yl)))

;—–세로의 line좌표 결정——-
(setq x1 (+ x0 xl1)
x2 (+ x1 xl2)
x3 (+ x2 xl3)
x4 (+ x3 xl4)
)

(setq pnt (list x0 y0)
pnt1 (list x1 y0)
pnt2 (list x2 y0)
pnt3 (list x3 y0)
pnt4 (list x4 y0)
)

;—–제목의 위치 결정——-
(setq x1_title (+ x0 (/ xl1 2))
x2_title (+ x1 (/ xl2 2))
x3_title (+ x2 (/ xl3 2))
x4_title (+ x3 (/ xl4 2))
)
(setq y_title (- y0 (/ yl 2)))

(setq pt1 (list x1_title y_title)
pt2 (list x2_title y_title)
pt3 (list x3_title y_title)
pt4 (list x4_title y_title)
)

(command "line" pnt pnt4 "")

(setq pnt10 (list x0 y0 (- y0 yl))
pnt11 (list x1 y0 (- y0 yl))
pnt12 (list x2 y0 (- y0 yl))
pnt13 (list x3 y0 (- y0 yl))
pnt14 (list x4 y0 (- y0 yl))
)

(setvar "cecolor" "green")

(command "line" pnt pnt10 "")
(command "line" pnt1 pnt11 "")
(command "line" pnt2 pnt12 "")
(command "line" pnt3 pnt13 "")
(command "line" pnt4 pnt14 "")
(command "line" pnt10 pnt14 "")

(setvar "cecolor" "yellow")

(command "text" "mc" pt1 "" "번 호")
(command "text" "mc" pt2 "" "도 면 명")

(command "text" "mc" pt3 "" "매수")
(command "text" "mc" pt4 "" "일련번호")

(setq x_txts (+ x_txts xl_total))
(setq x_txte (+ x_txte xl_total))
(setq y_txt (+ y_txt (* line_nn yl)))

)
)
) ; end of while

(if (= yul 1)
(progn
(setq zz 1)
(while (< zz 3)
(setq pnt (list x0 y0)
pnt1 (list x1 y0)
pnt2 (list x2 y0)
pnt3 (list x3 y0)
pnt4 (list x4 y0)
)
(command "line" pnt pnt4 "")

(setq pnt10 (list x0 (- y0 yl))
pnt11 (list x1 (- y0 yl))
pnt12 (list x2 (- y0 yl))
pnt13 (list x3 (- y0 yl))
pnt14 (list x4 (- y0 yl))
)

(setvar "cecolor" "green")

(command "line" pnt pnt10 "")
(command "line" pnt1 pnt11 "")
(command "line" pnt2 pnt12 "")
(command "line" pnt3 pnt13 "")
(command "line" pnt4 pnt14 "")
(command "line" pnt10 pnt14 "")

(setq zz (1+ zz))
(setq y0 (- y0 yl))

) ;end of while

(setvar "cecolor" "yellow")
(setq pt1 (list x1_title (+ y0 (/ yl 2))))
(setq pt4 (list x4_title (+ y0 (/ yl 2))))
(command "text" "mc" pt1 "" "계")
(if (= page 1)
(command "text" "mc" pt4 "" ilr)
(command "text" "mc" pt4 "" numet)
)
) ; end of progn
) ; end of if

(if (= yul 2)
(progn
(setq zz 1)
(setq xx (+ (- line_n (- line_nn line_n)) 2))

(while (< zz xx)
(setq pnt (list x0 y0)
pnt1 (list x1 y0)
pnt2 (list x2 y0)
pnt3 (list x3 y0)
pnt4 (list x4 y0)
)
(command "line" pnt pnt4 "")

(setq pnt10 (list x0 (- y0 yl))
pnt11 (list x1 (- y0 yl))
pnt12 (list x2 (- y0 yl))
pnt13 (list x3 (- y0 yl))
pnt14 (list x4 (- y0 yl))
)

(setvar "cecolor" "green")

(command "line" pnt pnt10 "")
(command "line" pnt1 pnt11 "")
(command "line" pnt2 pnt12 "")
(command "line" pnt3 pnt13 "")
(command "line" pnt4 pnt14 "")
(command "line" pnt10 pnt14 "")

(setq zz (1+ zz))
(setq y0 (- y0 yl))

) ;end of while

(setvar "cecolor" "yellow")
(setq pt1 (list x1_title (+ y0 (/ yl 2))))
(setq pt4 (list x4_title (+ y0 (/ yl 2))))
(command "text" "mc" pt1 "" "계")
(if (= page 1)
(command "text" "mc" pt4 "" ilr)
(command "text" "mc" pt4 "" numet)
)

) ; end of progn
) ; end of if

(close opf)

) ;end of defun


1씩증가하는 리습입니다.
한가지 수정부탁드립니다.
글씨크기가 5로 고정되어있는데 원하는만큼 글씨크기를 줄수있게 수정하여주시면 고맙겠습니다.


감사하게도 어떤분이 주셨는데요
해보니 안되더라구염…
전 리습 짜는것은 무지 라…
이제 공부하고 있는데요
사실 그저께부터 공부했음다..ㅡ_ㅡ;
//……………………………………………//

(DEFUN C:jj(/ ENT COLORNUMBER)
(SETQ ENT (SSGET "컬러를 바꿀 객체를 선택하시요""))
(SETQ COLORNUMBER (GETINT "COLOR NUM?"))
(COMMAND "CHANGE" ENT "" "P" "C" COLORNUMBER "")
)
//……………………………………………//
저에게 주신분이 익명으로 주셔서리….
다시 물어볼수가 없어서염..리습에 대해
아시는분 도움 좀 주세욤
저기에 무슨 오류가 있나여?
그냥 선색만 바꾸는거져 CHANGE 절차없이 …..
그리고 SSGET, GETINT 이게 무슨뜻이에여?

너무나 허접질문이져…황당한 분도 있을꺼라 생각…..
완죤초보라서염…

관련자료

댓글 3 / 1 페이지
전체 7,232 / 1 페이지
번호
제목
이름

최근글


새댓글


알림 0