비밀번호를 잊으셨나요?

비밀번호를 잊으셨나요? 비밀번호를 재설정하려면 이메일 주소를 입력해주세요.

계정이 있나요? 로그인

You must login to ask a question.

비밀번호를 잊으셨나요?

아직 계정이 없으신가요? 회원가입 하기

해당 질문을 신고하는 이유를 간단히 입력해주세요.

해당 답변을 신고하는 이유를 간단히 입력해주세요.

해당 유저를 신고하는 이유를 간단히 입력해주세요.

로그인회원가입

고캐드 – 캐드(CAD) 정보의 중심

고캐드 – 캐드(CAD) 정보의 중심 Logo 고캐드 – 캐드(CAD) 정보의 중심 Logo

고캐드 – 캐드(CAD) 정보의 중심 Navigation

  • Q&A
    • AutoCAD & CADian
    • Inventor & Solidworks
    • Revit & ArchiCAD
    • 자유질문
    • 기타
  • 커뮤니티
    • 오늘의이슈
    • 자유게시판
    • 익명게시판
    • 건의게시판
  • 자료실
    • 자료요청
    • 일반파일
    • 도면샘플
    • 유틸리티
    • 기타
  • 작품 갤러리
    • 그래픽
    • 캐드도면
    • 3D모델
    • 기타
  • 뉴스&이벤트
    • 공지사항
    • 뉴스
    • 전시/행사
    • 이벤트
    • 기타
검색
질문하기

Mobile menu

닫기
질문하기
  • 홈
  • 카테고리
    • AutoCAD & CADian
    • Inventor & Solidworks
    • Revit & ArchiCAD
    • 자유질문
    • 기타
  • 투표
  • 커뮤니티 그룹
  • Q&A
    • AutoCAD & CADian
    • Inventor & Solidworks
    • Revit & ArchiCAD
    • 자유질문
    • 기타
  • 커뮤니티
    • 오늘의이슈
    • 자유게시판
    • 익명게시판
    • 건의게시판
  • 자료실
    • 자료요청
    • 일반파일
    • 도면샘플
    • 유틸리티
    • 기타
  • 작품 갤러리
    • 그래픽
    • 캐드도면
    • 3D모델
    • 기타
  • 뉴스&이벤트
    • 공지사항
    • 뉴스
    • 전시/행사
    • 이벤트
    • 기타
홈/ 질문/Q 80327
다음
Lv.0
등록일: 2009-02-102009-02-10T21:35:59+09:00 2009-02-10T21:35:59+09:00카테고리: AutoCAD & CADian

소스를 나누구 싶은데 수정좀 부탁 드립니다.(간절함..)

dcl 작성 해서 미리 보기하면
사각형 가로,세로 확인
원형 지름 확인

이렇게 제가 나누어 놓았습니다.
사각형에 있는 확인을 누르면 캐드상에 사각형만 그려지게 하고싶고
원형에 있는 확인을 누르면 캐드상에 원형만 그려지게 하고 싶은데
제가 지금 소스 나누는거 정리를 잘 못하여 확인 누르면 사각형과 원형이
다 같이 그려져서 문제 입니다.

소스내용 적어놓을테니 수정 부탁드립니다.
dcl 소스는
aaa : dialog { label = “옵션”;
:row {


:column{


:boxed_column{label = “모재”;
 :edit_box {label = “X”; key = “key1”; edit_width = 5;}
 :edit_box {label = “Y”; key = “key2”; edit_width = 5;}
             }


 


:boxed_column{label = “오차보정”;
 :edit_box {label = “Ex”; key = “key3”; edit_width = 5;}
 :edit_box {label = “Ey”; key = “key4”; edit_width = 5;}
 :edit_box {label = “Ec”; key = “key5”; edit_width = 5;}
             }
        }
            
:boxed_column{label = “사각형”;
:column {
:image {key = “image1”; width = 16; height = 8; color =0; }
:edit_box { label = “X Length”; key = “key6” ; edit_width = 5;}
:edit_box { label = “Y Length”; key = “key7” ; edit_width = 5;}
     }
     ok_only;
     }
    
    
  
:boxed_column{label = “원형”;
:column {
:image {key = “image2”; width = 16; height = 10;  color =0; }
:edit_box { label = “Ø”; key = “key8” ; edit_width = 5;}
     }
     ok_only;
     }
     }
     }

그리고 lsp 소스는

(defun c:aaa()
  (if (/= (aaadlg) 0)
  (progn
   
     
      (setq p1 (list 0 0))
      (setq p2 (polar p1 (dtr 90) (atof B)))
      (setq p3 (polar p2 0 (atof A)))
      (setq p4 (polar p1 0 (atof A)))


      ;;****************************
      ;; 원형
      ;;****************************
   
      (defun aaacir()
      (initget 1)
      (setq A1 (/ (atof A) 2))
      (setq A2 (/ A1 2))
      (setq A21 (- A1 A2))
      (setq A22 (+ A1 A2))
      (setq o1 (list a21 b21))
      (setq A1 (/ (atof A) 2))
      (setq A2 (/ A1 2))
      (setq A21 (- A1 A2))
      (setq A22 (+ A1 A2))
     
      (setq B1 (/ (atof B) 2))
      (setq B2 (/ B1 2))
      (setq B21 (- B1 B2))
      (setq B22 (+ B1 B2))
      (setq o2 (list a21 b22))
      (setq B1 (/ (atof B) 2))
      (setq B2 (/ B1 2))
      (setq B21 (- B1 B2))
      (setq B22 (+ B1 B2))


     
      (setq C1 (/ (atof C) 2))
      (setq C2 (/ C1 2))
      (setq C21 (- C1 C2))
      (setq C22 (+ C1 C2))
      (setq o3 (list a22 b22))
      (setq C1 (/ (atof C) 2))
      (setq C2 (/ C1 2))
      (setq C21 (- C1 C2))
      (setq C22 (+ C1 C2))


      (setq D1 (/ (atof D) 2))
      (setq D2 (/ D1 2))
      (setq D21 (- D1 D2))
      (setq D22 (+ D1 D2))
      (setq o4 (list a22 b21))
      (setq D1 (/ (atof D) 2))
      (setq D2 (/ D1 2))
      (setq D21 (- D1 D2))
      (setq D22 (+ D1 D2))


      (setq o1 (list a21 b21))
      (setq o2 (list a21 b22))
      (setq o3 (list a22 b22))
      (setq o4 (list a22 b21))


      (setq x1 (/ (atof n1) 2))
      (setq y1 (/ (atof n2) 2))


      ;;************************
      ;;사각형
      ;;************************


      (defun aaarec()
      (initget 1)
      (setq aa1 (list (- (car o1) x1) (- (cadr o1) y1)))
      (setq aa2 (polar aa1 (dtr 90) (atof n2)))
      (setq aa3 (polar aa2 0 (atof n1)))
      (setq aa4 (polar aa1 0 (atof n1)))


      (setq bb1 (list (- (car o2) x1) (- (cadr o2) y1)))
      (setq bb2 (polar bb1 (dtr 90) (atof n2)))
      (setq bb3 (polar bb2 0 (atof n1)))
      (setq bb4 (polar bb1 0 (atof n1)))


      (setq cc1 (list (- (car o3) x1) (- (cadr o3) y1)))
      (setq cc2 (polar cc1 (dtr 90) (atof n2)))
      (setq cc3 (polar cc2 0 (atof n1)))
      (setq cc4 (polar cc1 0 (atof n1)))


      (setq dd1 (list (- (car o4) x1) (- (cadr o4) y1)))
      (setq dd2 (polar dd1 (dtr 90) (atof n2)))
      (setq dd3 (polar dd2 0 (atof n1)))
      (setq dd4 (polar dd1 0 (atof n1)))    
     
     


     



      (command “pline” aa1 aa2 aa3 aa4 “c”)
      (command “pline” bb1 bb2 bb3 bb4 “c”)
      (command “pline” cc1 cc2 cc3 cc4 “c”)
      (command “pline” dd1 dd2 dd3 dd4 “c”)
      (command “pline” p1 p2 p3 p4 “c”)
     
     
      (command “circle” o1 (Atof C))
      (command “circle” o2 (Atof C))
      (command “circle” o3 (Atof C))
      (command “circle” o4 (Atof C))
     



   
  )
  )
  )
  ;;;
(defun aaadlg()
  (setq A “120”)
  (setq B “40”)
  (setq N1 “12”)
  (setq N2 “10”)
  (setq c “8”)
 


  (setq dcl_id (load_dialog “c:/UserPRG/lemon.dcl”))
  (if (not (new_dialog “aaa” dcl_id)) (exit))
  (start_image “image1”)
  (slide_image 0 0 (dimx_tile “image1”) (dimy_tile “image1”) “c:/UserPRG/Drawing1”)
  (end_image)
  (start_image “image2”)
  (slide_image 0 0 (dimx_tile “image2”) (dimy_tile “image2”) “c:/UserPRG/Drawing2”)
  (end_image)
  (set_tile “key1” A)
  (set_tile “key2” B)
  (set_tile “key6” N1)
  (set_tile “key7” N2)
  (set_tile “key8” C)
  (action_tile “key1” “(setq A $value)”)
  (action_tile “key2” “(setq B $value)”)
  (action_tile “key6” “(setq N1 $value)”)
  (action_tile “key7” “(setq N2 $value)”)
  (action_tile “key8” “(setq C $value)”)
  (start_dialog)
  )
;;;
(defun dtr(a) (setq x (* pi (/ a 180.0))))



입니다. 제가 책 보고 시도해보았는데 안되었네요
lsp 소스에서 나누는것 같습니다 그렇나요?
수정 꼭 부탁 드립니다.고수님들….정말 정말 부탁 드립니다.!


  • 0
  • 12 조회
공유
  • Facebook

    관련 있는 질문들

    • 도서관 도면 구합니다. !
    • 캐드2022 레이어 그룹 분류시 레이어 드래그 오류
    • 전기도면 나사모양의 폴리선을 그릴수 있나요?
    • 캐드, zw캐드 와이프아웃 박스가 너무 많이 생겨요. 폴리선 박스가 중첩으로 많이 생겨요

    Sidebar

    질문하기
    공지사항

    • AI CAD의 미래! 캐디안 2025 1+1 프로모션 안내 2025-05-14

    Adv 234x60

    aalan

    Adv 234x60

    aalan

    Adv 120x600

    aalan

    Explore

    • 홈
    • 카테고리
      • AutoCAD & CADian
      • Inventor & Solidworks
      • Revit & ArchiCAD
      • 자유질문
      • 기타
    • 투표
    • 커뮤니티 그룹
    aalan

    Footer

    Support

    • 회사 및 서비스 소개
    • 자주 묻는 질문
    • 문의하기

    Guide

    • 제휴/협업 안내
    • 광고 서비스 안내

    Policy

    • 서비스 이용약관
    • 개인정보 처리방침
    • 광고성 정보 수신 동의

    Contents

    • 고밍스토리
    • 리습 시리즈

    정소프트 | 사업자등록번호 : 677-40-00198 | 대표 : 정은숙 | 이메일 : gocad.manager@gmail.com
    주소 : 서울특별시 강서구 양천로 400-12, 6층 614,615,617호(등촌동, 더리브골드타워)
    Copyright. 2012-2024 GOCAD All rights reserved