비밀번호를 잊으셨나요?

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

계정이 있나요? 로그인

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 86605
다음
생꼬
생꼬Lv.0
등록일: 2010-03-262010-03-26T10:12:04+09:00 2010-03-26T10:12:04+09:00카테고리: AutoCAD & CADian

면적 및 길이 구하는 리습에 문제가 있어요

아래와 같은 면적과 선분의 길이를 구하는 리습을 사용하고 있는데요
전에는 안그랬는데 최근 캐드를 다시 깔고 하는데
명령어를 치면 로딩시간이 생기고
면적계산 값이 나올때도 로딩시간이 생깁니다…
이방법 저방법 다 해봤는데 해결방법을 모르겠네요



;;;   AT.lsp
;;;   (C) Copyright 1988-1992 by Autodesk, Inc.
;;; 
;;;   This program is copyrighted by Autodesk, Inc. and is  licensed
;;;   to you under the following conditions.  You may not distribute
;;;   or  publish the source code of this program in any form.   You
;;;   may  incorporate this code in object form in derivative  works
;;;   provided  such  derivative  works  are  (i.) are  designed and
;;;   intended  to  work  solely  with  Autodesk, Inc. products, and
;;;   (ii.)  contain  Autodesk’s  copyright  notice  “(C)  Copyright
;;;   1988-1992 by Autodesk, Inc.”
;;;
;;;   AUTODESK  PROVIDES THIS PROGRAM “AS IS” AND WITH  ALL  FAULTS.
;;;   AUTODESK  SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF  MER-
;;;   CHANTABILITY OR FITNESS FOR A PARTICULAR USE.  AUTODESK,  INC.
;;;   DOES  NOT  WARRANT THAT THE OPERATION OF THE PROGRAM  WILL  BE
;;;   UNINTERRUPTED OR ERROR FREE.
;;;
;;;   by Jin S. Oh
;;;   29 October 1996
;;;  
;;;   REVISIONS
;;;   1.01  22 May 1991  DTP — Minor bug fixes.
;;;   1.02  18 June 1991  JSY, DTP — Minor bug fixes.
;;;   1.03   7 December 2000  
;;;————————————————————————–;
;;; DESCRIPTION
;;;   This is a “text processor” which operates in a global manner
;;;   on all of the text entities that the user selects; i.e., the
;;;   Height, Justification, Location, Rotation, Style, Text, and
;;;   Width can all be changed globally or individually, and the
;;;   range of values for a given parameter can be listed.
;;;—————————————————————————;
;;;
;;; Main function — no arguments
;;;
(defun aaa (/   SW opt1 unctr ct_ver aa_er aa_oe
                p1 p2 ars d dd
                aa_oc aa_ot aa_oh loc loc1 )


  (setq ct_ver “1.03”)                ; Reset this local if you make a change.
  (setq digt 2)
  (setvar “dimzin” 0)
  ;;
  ;; Internal error handler defined locally
  ;;
  (defun aa_er (s)                   ; If an error (such as CTRL-C) occurs
                                      ; while this command is active…
    (if (/= s “Function cancelled”)
      (if (= s “quit / exit abort”)
        (princ)
        (princ (strcat “nError: ” s))
      )
    )
    (eval(read U:E))
    (if aa_oe                        ; If an old error routine exists
      (setq *error* aa_oe)           ; then, reset it
    )
    (if temp (redraw temp 1))
    (if aa_oc (setvar “cmdecho” aa_oc)) ; Reset command echoing
    (if aa_os (setvar “osmode” aa_os))
    (if aa_oh (setvar “highlight” aa_oh))
    (princ)
  )
  ;;
  ;; Body of function
  ;;
  (if *error*                         ; Set our new error handler
    (setq aa_oe *error* *error* aa_er)
    (setq *error* aa_er)
  )


  ;; Set undo groups and ends with (eval(read U:G)) or (eval(read U:E))
  (setq U:G “(command ”undo” ”group”)”
        U:E “(command ”undo” ”en”)”
  )
 
  (setq aa_oc (getvar “cmdecho”))
  (setq aa_os (getvar “osmode”))
  (setq aa_oh (getvar “highlight”))
  (setvar “cmdecho” 0)
 
  (eval(read U:G))


  (princ (strcat “nChange text, Version ” ct_ver
                 “, (c) 1990-1996 by Hanyoung, Inc. “))


  ;; This is the main option loop.
  (setq unctr 0)
  (aa_ol)


  (if aa_oe (setq *error* aa_oe))   ; Reset old error function if error
  (eval(read U:E))
  (if aa_os (setvar “osmode” aa_os))
  (if aa_oh (setvar “highlight” aa_oh))
  (if aa_oc (setvar “cmdecho” aa_oc)) ; Reset command echoing
  (princ)
)
;;;
;;; The option loop.
;;;
(defun aa_ol ()
  (setq sw         T)
  (if (= chr_cm nil)
     (progn
     (setq opt     “D”
           chr_cm  “D”))
     (setq opt chr_cm));if
  (while sw
    (setq unctr (1+ unctr))
    (command “_.UNDO” “_GROUP”)
    (initget “D A B U X”)
    (setq opt1 (getkword
         (strcat “nDist line/Area line/area Boundary/Undo/eXit <” chr_cm  “>: “)))
    (if opt1 (setq opt opt1))
    (if opt
      (cond
        ((= opt “X”)
          (setq sw nil)                    ; Exit command.
        )
        ((= opt “U”)
          (setq chr_cm “U”)
          (aa_ue)                   ; Undo the previous command.
        )
        ((= opt “D”)
          (setq chr_cm “D”)
          (aa_dl)                    ; Distance.
        )
        ((= opt “A”)
          (setq chr_cm “A”)
          (aa_al)                    ; Area.
        )
        ((= opt “B”)
          (setq chr_cm “B”)
          (aa_ab)                    ; Boundary Area.
        )
      )
    )
    (command “_.UNDO” “_END”)
  )
)
;;;
;;; Undo an entry.
;;;
(defun aa_ue ()
  (if (> unctr 1)
    (progn
      (command “_.UNDO” “_END”)
      (command “_.UNDO” “2”)
      (setq unctr (- unctr 2))
    )
    (progn
      (princ “nNothing to undo. “)
      (setq unctr (- unctr 1))
    )
  )
)
;;;
;;;Distance-line
;;;
(defun aa_dl ()
 (graphscr)
        (if aa_os (setvar “osmode” aa_os))
        (setq d 0 dd 0)
        (while (setq p1 (getpoint “n First point : “))
               (command “pline” p1)
               (while  (setq p2 (getpoint P1 “n Next  point : “))
                       (setq d (+ d (distance p1 p2)))
                       (command p2)
                       (setq p1 p2))
               (setq dd (+ dd d))
               (setq d 0)
               (command “”)
               (princ “n Add ? < No -> Enter > “))
        (princ “n Distance : “)(princ (rtos dd 2 digt))(princ ” m”)
        (SETQ ARS (RTOS DD 2 digt))
        (PUTTEXT)
)
;;;
;;; Area
;;;
(defun aa_ab2 ()
 (graphscr)
 (setvar “osmode” 0)
 (setq pp (getpoint “nPick point area : “)) (terpri)
 (if pp                               ;1
       (progn
       (bpoly pp)
       (command “area” “e” “l” )
       (setq are (getvar “area”))
       (if are                        ;2
              (progn
              (setq ars (rtos are 2 digt))
              (princ “n Area = “)
              (princ are) (terpri)
              (PUTTEXT)
              (princ));;progn
 );;if2
));;if1
)


(defun aa_ab ()
 (graphscr)
 (setvar “osmode” 0)
        (setq d 0 dd 0)
        (while (setq p1 (getpoint “nPick point area : “))
         (bpoly p1)
         (setq aa (entlast))
         (command “area” “e” aa )
         (setq are (getvar “area”))
         (if are                        ;2
                (progn
                (setq ars (rtos are 2 digt))
                (princ “n Area = “)
                (princ are) (terpri)
                 (setq dd (+ dd are))
          );progn
         );if
                (princ “n Add ? < No -> Enter > “)
          )
   (princ “n Area = “)(princ (rtos dd 2 digt))(princ ” m^2″)
   (SETQ ARS (RTOS DD 2 digt))
        (PUTTEXT)
)
;;;
;;;Area-line
;;;
(defun aa_al()
        (setq   aa     0)
        (while (setq p1 (getpoint “n First point : “))
               (command “pline” p1)
               (while (setq p2 (getpoint P1 “n Next  point : “))
                      (command p2)
                      (SETQ P1 P2))
               (command “”)
               (command “area” “e” “l”)
               (command “redraw”)
               (setq aa (+ aa (getvar”area”)))
               (princ “n Add ? < No -> Enter > “))
        (princ “n Area : “)(princ (rtos aa 2 digt))(princ ” m^2″)
        (SETQ ARS (RTOS AA 2 digt))
        (PUTTEXT)
)
;; Put Text
(DEFUN PUTTEXT(/ TT)
 (if (setq tt (entsel “n Target : “))
  (command “change” tt “” “” “” “” “” “” ars)
 )
 (princ)
 );;PUTTEXT
(defun PUTTEXT2(/ X Y XY)
        (if aa_os (setvar “osmode” aa_os))
        (IF (setq ptxt (getpoint “nPick Text point : “))
            (PROGN
            (TERPRI)
            (SETQ X    (CAR PTXT))
            (SETQ Y    (CAR (CDR PTXT)))
            (SETQ XY (LIST (+ X 2.5) (+ Y 0.25)))
            (setvar “osmode” 0)
            (command “text” “R” XY “0.5” “” ars)
            (if aa_os (setvar “osmode” aa_os))
            ));;PROGN
 );;PUTTEXT2
;;;
;;; The C: function definition.
;;;
(defun c:aa() (aaa))
(princ “ntc:AA loaded.  Start command with AA.”)
(princ)
;;;
;;; Add Text
;;;
(defun c:zz(/ tot ind ent)
  (setvar “cmdecho” 0)
   (prompt “n>>select first text : “)
   (setq tot1(ssget))
           (setq a (entget(ssname tot1 0)))
           (setq b (assoc 1 a))
           (setq c (cdr b))
           (setq cc (atof c))
   (prompt “n>>select second text : “)
   (setq tot2(ssget))
           (setq a (entget(ssname tot2 0)))
           (setq b (assoc 1 a))
           (setq c (cdr b))
           (setq ccc (atof c))
   (setq number (+ cc ccc))
 (setq ar (rtos number 2 1))
 (princ (strcat “area ==> “(rtos number 2 1)))
 (princ “select change text”)
 (setq ss (ssget))
 (command “change” ss “” “” “” “” “” “” ar)
  (setvar “cmdecho” 1)
   (princ)
)

  • 0
  • 170 조회
공유
  • Facebook

    관련 있는 질문들

    • 직선의 한 지점에서 원의 최대거리 선 그리기
    • 캐드 모깎기 질문 드립니다
    • 블럭깰때 가시성으로 가려진 블럭들 처리
    • PDF 출력

    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