제가 2012 캐드 32비트 를 쓰고 있습니다

처음에 캐드를 깔고 실행해서 몇몇 명령어를 써보니

불편한게 몇개 있더군요

예를 들어 스트레치를 할려고 하면 영역을 잡아서 객체를 선택할때 우하단에서 좌상단으로 해야만 선이 선택되고

좌상단에서 우하단으로 드레그 하면 선택이 되지 않는문제 점 하고

또하나는 break명령어 사용시 영역선택을 해서 선을 못잡고 선을 일일이 선택(클릭)해서 잡아야 하고

또 첫번째 점 찍고 두번쨰 점 찍고 를 하려고 하면 안되고 꼭 첫번째점 을 찍기위해 명령어를 기입해야 하더군요

제가 이질문을 하기위해 설명이 길었는데

주요는 제가 가지고 있는 리습이 하나 잇습니다 어디서 구했는지는 저도 기억이 잘나지 않아서 ....

아무튼 그리습을 로드 시키면 위에 써놓은 문제점들이 해결 되더군요 아마 캐드파워에 있는 명령어를 리습화 해놓은듯도 한데

잘 알지 못해서 ... 리습에 대한 설명및 자문을 부탁드리고 싶습니다

 

어떻게 파일을 올려야 하는지 몰라 리습을 복사 붙여 넣기 하겟습니다.  혹시 궁금 하신게 잇으시면    000314lsj  카톡 아이디 입니다


; ACAD.LSP Programmed by GID (Goh, Il-Du)
; Latest Revision  8:24pm Apr 23,1989
; CLEAN, LOAD AutoLISP Function Resident or Transent
; Use RLOAD, FLOAD, ALOAD, CLEAN, CLEANALL in command: prompt
; RLOAD load function resident, FLOAD doesn't clear these functions
; FLOAD clears function FLOADed prevoiusly, & Loads function transient
; ALOAD appends function to transient area
; xLOAD searchs .LSP file in normal ACAD search directory first, C:\LSP\ next
; xLOAD executes function automatically which is named "c:filename" if exist
; CLEAN clears transient functions, & Closes un-closed files automatically
; CLEANALL clears all transient & resident functions

(if (null @fname)
    (progn
       (setq @fname "")
       (princ "\n \n \nLoading ACAD.LSP v10.4  April/89  by GID...  ")
    )
)
(setq @errfn *error*
      @oitem ""
      @loads ""
      @resid ""
      @clean ""
      @cmark ""
      @exec ""
      @ffile ""
      @msg ""
      @cln ""
      @wkp ""
      @wkf ""
      @wk ""
      c:fload ""
      c:aload ""
      c:rload ""
      c:cleanall ""
      c:clean ""
)
(defun @ffile (@wkf / @wk)
  (if (null (setq @wk (findfile (strcat @wkf ".lsp"))))
      (setq @wk (findfile (strcat "c:/ACAD/" @wkf ".lsp")))
  )
  @wk
)
(defun @loads (@msg @cln @wkp / @wk)
  (setq @resid @wkp)
  (setq @wk (getstring (strcat (if @cln "Clean & " "") @msg " Function" "<" @fname ">: " )))
  (if (/= "" @wk)(setq @fname @wk))
  (if (setq @wk (@ffile @fname))
      (progn
          (if @cln (@clean '@@CMRK))
          (if (and @resid (= (car atomlist) '@@CMRK))
              (setq atomlist (cdr atomlist))
          )
          (load @wk)
      )
      (progn
          (princ "Function not found")
          (prin1)
      )
  )
)
(defun @exec (/ @wk)
  (setq @wk (read (strcat "c:" @fname )))
  (if (eval @wk)
      (eval (list @wk))
      (prin1)
  )
)
(defun C:fload ()
  (@loads "Load" T nil)
  (@exec)
)
(defun C:aload ()
  (@loads "Append" nil nil)
  (@exec)
)
(defun C:rload ()
  (@loads "Reside" T T)
;  (load (@ffile "@@CMRK"))
  (load "acad")
  (@exec)
)
(defun @clean (@cmark / @wk)
   (setq @wk 0
         *error*
         (lambda (@wk)
           (setq *error* @errfn)
           (princ "\nFile Variable <")(princ @oitem)(princ "> erased. Try Again" )
           (set @oitem nil)
           (@clean @cmark)
         )
   )
   (while (and
             (/= (setq @oitem (nth @wk atomlist)) @cmark)
             (/= @oitem 'C:CLEAN)
          )
          (if (= (type (eval @oitem)) 'FILE) (close (eval @oitem)))
          (setq @wk (1+ @wk))
   )
   (if (and (= @oitem 'C:CLEAN) (/= @cmark 'C:CLEAN))
       (princ "\nSymbol \"@@CMRK\" not found")
       (setq atomlist (member @cmark atomlist)
             *error* @errfn
       )
   )
   (prin1)
)
(defun c:cleanall ()
   (@clean 'C:CLEAN)
;   (load (@ffile "@@CMRK"))
   (load "acad")
   (prin1)
)
(defun c:clean ()
   (@clean '@@CMRK)
   (prin1)
)
;(if (not (@ffile "@@CMRK"))
;    (progn
;       (setq @wk (open "@@CMRK.LSP" "w"))
;       (princ "(setq @@CMRK T)\n" @wk)
;       (close @wk)
;       (princ "@@CMRK.LSP Created...  ")
;    )
;)
(setq @@CMRK T)
(prin1)
(vmon)
(defun dtr (a) (* pi (/ a 180.0)))
(defun rtd (a) (/ (* a 180.0) pi))
(defun C:FL ()
  (setq FN (getstring "Enter the file-name to load :"))
  (load FN)
)
(vmon)
(defun c:mline(/ p1 p2 p3 p1u p1d p2u p2d p2-u p2-d p3u p3d a b)
 (setq q(getreal "\nOffset from Centerline:")
       p1(getpoint "\nFirst Point:")
       p2(getpoint "\nSecond Point:")
       p1u(polar p1(+ (angle p1 p2)(/ pi 2)) q)
       p1d(polar p1(- (angle p1 p2)(/ pi 2)) q)
       p2u(polar p2(+ (angle p1 p2)(/ pi 2)) q)
       p2d(polar p2(- (angle p1 p2)(/ pi 2)) q)
 );setq close
  (while (/= nil (setq p3(getpoint "\nNext Point:")))
                 (setq p2-u(polar p2 (+ (angle p2 p3)(/ pi 2)) q)
                       p2-d(polar p2 (- (angle p2 p3)(/ pi 2)) q)
                       p3u(polar p3 (+ (angle p2 p3)(/ pi 2)) q)
                       p3d(polar p3 (- (angle p2 p3)(/ pi 2)) q)
                       a(inters p1u p2u p3u p2-u nil)
                       b(inters p1d p2d p3d p2-d nil)
                 );setq close
      (command "line" p1u a "")
      (command "line" p1d b "")
      (command "linetype" "s" "center" "")
      (command "line" p1 p2 "")
      (command "linetype" "s" "bylayer" "")
       (setq p1 p2 p2 p3 p1u a p1d b p2u p3u p2d p3d)
   );while close
(vmon)
);defun close
(defun c:errr()
 (setq w(ssget "x"))
 (command "erase" w "")
 (command "redraw")
)
(vmon)
(defun ssx-l(/ a s en)
 (setq a(strcase (getstring "\nLayer Name:")))
 (setq s(ssget "x") c 0)
 (repeat (sslength s)
    (setq en(ssname s c))
    (if (= a (cdr (assoc 8 (entget en))))
     (command "erase" en "")
    )
  (setq c(1+ c))
 )
)
(defun *ERROR* (st)
       (terpri)
       (princ "\nerror: ")
       (princ st)
       (princ)
)

(defun chgterr (s)
   (if (/= s "Function cancelled")   ; If an error (such as CTRL-C) occurs
      (princ (strcat "\nError: " s)) ; while this command is active...
   )
   (setq p nil)                      ; Free selection set
   (setq *error* olderr)             ; Restore old *error* handler
   (princ)
)

(defun C:B(/ ss sno pt1 pt2 no x)
       (princ " = BREAK2P")
       (setq ss (ssget))
       (setq sno (sslength ss))
       (setq pt1 (getpoint "\n>>> First Point : "))
       (setq pt2 (getpoint pt1 "\n>>> Second Point : "))
       (setq no 0)
       (repeat sno
           (setq x (ssname ss no))
           (command "break" x pt1 pt2)
           (setq no (1+ no))
       )(prin1)
)

(defun C:BOX1()
       (setq inp (getpoint "\n>>> Low Left Coner of The Polyline BOX : "))
       (setq hsz (getdist "\n>>> Horizontal Distance ? " inp))
       (setq vsz (getdist "\n>>> Vertical Distance ? " inp))
       (command "pline" (list (car inp) (cadr inp))
                 (list (+ (car inp) hsz) (cadr inp))
                 (list (+ (car inp) hsz) (+ (cadr inp) vsz))
                 (list (car inp) (+ (cadr inp) vsz))
                 "c")
       (prin1)
)

(defun C:CT (/ p l n e os as ns st s nsl osl sl si chf chm olderr)
   (setq olderr  *error*             ; Initialize variables
         *error* chgterr
         chm     0)
   (setq p (ssget))                  ; Select objects
   (if p (progn                      ; If any objects selected
      (while (= 0 (setq osl (strlen (setq os (getstring t "\nOld string: ")))))
            (princ "Null input invalid")
      )
      (setq nsl (strlen (setq ns (getstring t "\nNew string: "))))
      (setq l 0 n (sslength p))
      (while (< l n)                 ; For each selected object...
         (if (= "TEXT"               ; Look for TEXT entity type (group 0)
                (cdr (assoc 0 (setq e (entget (ssname p l))))))
            (progn
               (setq chf nil si 1)
               (setq s (cdr (setq as (assoc 1 e))))
               (while (= osl (setq sl (strlen
                             (setq st (substr s si osl)))))
                  (if (= st os)
                      (progn
                        (setq s (strcat (substr s 1 (1- si)) ns
                                        (substr s (+ si osl))))
                        (setq chf t) ; Found old string
                        (setq si (+ si nsl))
                      )
                      (setq si (1+ si))
                  )
               )
               (if chf (progn        ; Substitute new string for old
                  (setq e (subst (cons 1 s) as e))
                  (entmod e)         ; Modify the TEXT entity
                  (setq chm (1+ chm))
               ))
            )
         )
         (setq l (1+ l))
      )
   ))
   (princ "Changed ")                ; Print total lines changed
   (princ chm)
   (princ " text lines.")
   (terpri)
   (setq *error* olderr)             ; Restore old *error* handler
   (princ)
)

(defun c:DC()
     (princ " = Dimension Text Change")
     (setq ss (ssget))
     (setq ntxt (getstring "\n>>> New Text : "))
     (command "dim" "newtext" ntxt "p" "" "exit")
     (prin1)
)
(defun c:Du()
     (princ " = Dimensoin style change")
     (setq ss (ssget))
     (command "dim" "update" "p" "" "exit")
     (prin1)
)
(defun c:DH()
     (princ " = Dimensoin Hometext")
     (setq ss (ssget))
     (command "dim" "hometext" "p" "" "exit")
     (prin1)
)


(setq len 0)
(DEFUN C:DL ()
     (command "blipmode" "off")
     (command "ortho" "off")
     (setq pok (rtos len 2 0))
     (setq wid (GETREAL (strcat ">>> Width of Double Line<" pok ">: ")))
     (if (/= nil wid) (setq len wid) (setq wid len))
     (setq wid2 (/ wid 2))
     (SETQ pt1 (GETPOINT "\n>>> First Point: "))
     (SETQ pt2 (GETPOINT "\n>>> Second Point: " pt1))
     (setq ang (angle pt1 pt2))
     (SETQ AngP (+ ang (/ PI 2)))
     (SETQ AngM (- ang (/ PI 2)))
     (SETQ pt1p (POLAR pt1 angP wid2))
     (SETQ pt1m (POLAR pt1 angm wid2))
     (setq pt2p (polar pt2 angp wid2))
     (setq pt2m (polar pt2 angm wid2))
     (command "line" pt1p pt2p "")
     (command "line" pt1m pt2m "")
     (setq sp pt1) (setq spp pt1p) (setq spm pt1m)
     (setq 2sp pt2) (setq pt3 pt2)
     (while pt3
        (if (= pt3 "Undo")
        (progn (initget 8 "Close")
               (setq pt3 (getpoint "\n>>> Close/<Next point>: "pt2)))
        (progn (initget 8 "Close Undo")
        (setq pt3 (getpoint "\n>>> Close/Undo/<Next point>: "pt2)))
        )
        (if (= pt3 nil) (command "blipmode" "on")   
        (progn
          (if (= pt3 "Undo")
          (progn
          (command "erase" pt3p pt3m "")
          (command "ortho" "off")
          (command "change" cpt2p "" p2p)
          (command "change" cpt2m "" p2m)
          (setq pt1 p1 pt2 p2 pt2p p2p pt2m p2m)
          )
        (progn
            (if (= pt3 "Close") (setq npt sp) (setq npt pt3))
            (setq angp (/ (+ pi (angle pt1 pt2) (angle pt2 npt)) 2))
            (setq angm (+ pi angp))
            (setq ang (- (+ pi (angle pt1 pt2)) angp))
            (setq thk (* wid2 (/ 1 (sin ang))))
            (setq cpt2p (polar pt2 angp thk))
            (setq cpt2m (polar pt2 angm thk))
            (command "change" pt2p "" cpt2p)
            (command "change" pt2m "" cpt2m)
       
            (if (= pt3 "Close")
            (progn  
            (setq angp (/ (+ pi (angle pt2 sp) (angle sp 2sp)) 2))
            (setq angm (+ pi angp))
            (setq ang (- (+ pi (angle pt2 sp)) angp))
            (setq thk (* wid2 (/ 1 (sin ang))))
            (setq cpt3p (polar sp angp thk))
            (setq cpt3m (polar sp angm thk))
            (command "ortho" "off")
            (command "change" spp "" cpt3p)
            (command "change" spm "" cpt3m)
            (command "line" cpt2p cpt3p "")
            (command "line" cpt2m cpt3m "")
            (setq pt3 nil)
            )
            (progn
            (setq angp (+ (angle pt2 pt3) (/ pi 2)))
            (setq angm (- (angle pt2 pt3) (/ pi 2)))
            (setq pt3p (polar pt3 angp wid2))
            (setq pt3m (polar pt3 angm wid2))
            (command "line" cpt2p pt3p "")
            (command "line" cpt2m pt3m "")
            (setq p1 pt1 p2 pt2 p2p pt2p p2m pt2m)
            (setq pt1 pt2) (setq pt2 pt3)
            (setq pt2p pt3p) (setq pt2m pt3m)
            )
            )
        ))
   ))) 
)

(defun c:HID()
       (princ " = Hidden Linetype")
       (setq ss (ssget))
       (command "change" "p" "" "p" "lt" "hid" "")
       (prin1)
)


(DEFUN C:LC(/ EO EL NLA NO E ZO ZL OLD NEW)
       (PROMPT "\n>>> Select Entities To Change..... ")
       (SETQ EO (SSGET))
       (PROMPT "\n>>> To What Entity?..... ")
       (SETQ EL (SSGET))
       (IF EL
           (SETQ NLA (CDR (ASSOC 8 (ENTGET (SSNAME EL 0)))))
           (SETQ NLA (STRCASE (GETSTRING
                                 "\n>>> Otherwise, Say Me Layer Name : ")))
       )
       (SETQ NO 0)
       (WHILE
          (SETQ E (SSNAME EO NO))
          (SETQ ZO (ENTGET E))
          (SETQ OLD (ASSOC 8 ZO))
          (SETQ NEW (CONS (CAR OLD) NLA))
          (SETQ ZL (SUBST NEW OLD ZO))
          (ENTMOD ZL)
          (SETQ NO (1+ NO))
       )
       (PRIN1)
)

(defun C:LS()
       (princ " = LTSCALE")
       (command "ltscale")(prin1)
)

(defun C:S()
       (princ " = STRETCH")
       (command "stretch" "c")(prin1)
)

;(defun c:q()
;       (princ " = zoom ")
;       (command "zoom" "w")(prin1)
;)
;(defun c:w()
;       (princ " = zoom ")
;       (command "zoom" "p")(prin1)
;)
(defun c:cl()
       (princ " =clayer ")
       (command "clayer")
)
(defun c:150()
       (princ " =dimstyle ")
       (command "dimstyle" "R" "150")
)

(defun c:100()
       (princ " =dimstyle ")
       (command "dimstyle" "R" "100")
)

(defun c:50()
       (princ " =dimstyle ")
       (command "dimstyle" "R" "50")
)

(defun c:35()
       (princ " =dimstyle ")
       (command "dimstyle" "R" "35")
)

(defun c:75()
       (princ " =dimstyle ")
       (command "dimstyle" "r" "75")
)

(princ)

(defun chgterr (s)
   (if (/= s "Function cancelled")   ; If an error (such as CTRL-C) occurs
      (princ (strcat "\nError: " s)) ; while this command is active...
   )
   (setq p nil)                      ; Free selection set
   (setq *error* olderr)             ; Restore old *error* handler
   (princ)
)

(defun c:DC()
     (princ " = Dimension Text Change")
     (setq ss (ssget))
     (setq ntxt (getstring "\n>>> New Text : "))
     (command "dim" "newtext" ntxt "p" "" "exit")
     (prin1)
)

(defun c:DH()
     (princ " = Dimensoin Hometext")
     (setq ss (ssget))
     (command "dim" "hometext" "p" "" "exit")
     (prin1)
)

(defun LASET(Q:LA / Z)
       (SETQ Z (TBLSEARCH "LAYER" Q:LA))
       (IF Z
           (COMMAND "LAYER" "S" Q:LA "")
           (COMMAND "LAYER" "M" Q:LA "")
       )
)

(defun C:DM(/ pt z)
       (setvar "cmdecho" 0)
       (princ ">>> Dimension Layer and Text Style Setting ....")
       (setq Q:LAINIT (getvar "clayer"))
       (setq Q:LA "dim")
       (command "dim1" "style" "HSH")
       (princ ">>> O.K.!")
       (setq z (getstring "\n>>> Vertical/Horisontal/Aligned ? <H> : "))
       (setq z (strcase z))
       (if (= z "V")
           (setq dimode "ver")
           (if (= z "A")
               (setq dimode "ali")
               (setq dimode "hor")
           )
       )
       (laset Q:LA)
       (setq bpt (getpoint "\n>>> First Originpoint      : "))
       (setq pt1 bpt)
       (setq pt2 (getpoint "\n>>> Second Originpoint     : " pt1))
       (setq dimlocpt (getpoint "\n\n\n>>> Dim-Location             : " pt1))
       (command "dim" (setq z dimode)
                (setq pt pt1) (setq pt pt2) (setq pt dimlocpt) "" "exit")
       (setq pt (getpoint "\n\n\n>>> To Point         : " pt2))
       (while pt
              (command "dim" "con" (setq pt pt) "" "exit")
              (setq lpt pt)
              (setq pt (getpoint "\n\n\n>>> To Point         : " pt))
       )
       (setq z (getstring "\n\n\n>>> Single or Double <D> : "))
       (setq z (strcase z))
       (if (/= z "S")
           (progn
              (command "dim" "con" (setq pt lpt) "" "exit")
              (command "erase" "l" "")
              (command "dim" "bas" (setq pt bpt) "" "exit")
              (command "redraw")
           )
       )
       (command "layer" "s" (setq z Q:LAINIT) "")
       (prin1)
)

(defun C:ds()
       (setvar "cmdecho" 0)
       (setq oldsc (getvar "ltscale"))
       (setq txtsc (rtos oldsc 2 0))
       (setq scale (getreal (strcat ">>> Dimension Scale? 1/<" txtsc ">: ")))
       (if (/= nil scale) (setq oldsc scale) (setq scale oldsc))
       (setvar "dimtxsty" "hsh")
       (setvar "dimalt" 0)
       (setvar "dimaltd" 2)
       (setvar "dimaltf" 25.4)
       (setvar "dimaso" 1)
       (setvar "dimcen" 2.0)
       (setvar "dimdle" 2.0)
       (setvar "dimdli" 8.0)
       (setvar "dimdec" 0)
       (setvar "dimexe" 2.0)
       (setvar "dimexo" 3.0)
       (setvar "dimlfac" 1)
       (setvar "dimfit" 3)
       (setvar "dimlim" 0)
       (setvar "dimrnd" 0)
       (setvar "dimscale" scale)
       (setvar "dimse1" 0)
       (setvar "dimse2" 0)
       (setvar "dimsho" 0)
       (setvar "dimtih" 0)
       (setvar "dimtoh" 0)
       (setvar "dimtad" 0)
       (setvar "dimtix" 1)
       (setvar "dimtofl" 1)
       (setvar "dimtol" 0)
       (setvar "dimtvp" 1)
       (setvar "dimtxt" 3.0)
       (setvar "LTSCALE" SCALE)
       (setq dort (getstring "\n>>> Dot or Tick ? <D> :"))
       (setq dort (strcase dort))
       (if (= dort "T")
           (progn (setvar "dimtsz" 1)
                  (setvar "dimasz" 0))
           (progn (setvar "dimtsz" 0)
                  (setvar "dimasz" 1)
                  (command "insert" "c:ARCHTOOL/BLOCK/dimdot" 0,0 )
                  (command "dim" "dimblk" "dimdot" "exit"))
       )
       (prin1)
)

(defun c:dimkey()
(prompt "\n            >>> DIMENSOIN ONEKEY <<<")
(prompt "\n           * DS  :  Dimension Setting")
(prompt "\n           * DM  :  Dimension Creating")
(prompt "\n           * DC  :  Dimension text Change")
(prompt "\n           * DH  :  Dimension Home text")
(terpri)
(prin1)
)

(prompt "\n>>> Dimension Program Loaded !")
(prin1)

 ;                                  SSX.LSP                                    |
 ;                                                                             |
 ;           Larry Knott          Version 2.0             7/18/88              |
 ;                                                                             |
                                       ;    "(SSX)" -  Easy SSGET filter routine.                                    |
;                                                                             |
;    Creates a selection set.  Either type "(SSX)" at the "Command:" prompt   |
;    to create a "previous" selection set or type "(SSX)" in response to any  |
;    "Select objects:" prompt.  You may use the functions "(A)" to add        |
;    entities and "(R)" to remove entities from a selection set during object |
;    selection.  More than one filter criteria can be used at a time.         |
;                                                                             |
;-----------------------------------------------------------------------------|

;--------------------------- INTERNAL ERROR HANDLER --------------------------|

(defun ssx-err (s)                    ; If an error (such as CTRL-C) occurs
                                      ; while this command is active...
(if (/= s "Function cancelled")
    (princ (strcat "\nError: " s))
)
(setq *error* olderr)                 ; Restore old *error* handler
(princ)
)

;-------------------------- ADD AND REMOVE FUNCTIONS -------------------------|

(defun r() (command "r") (ssx))
(defun a() (command "a") (ssx))

;-------------------------------- MAIN PROGRAM -------------------------------|

(defun ssx (/ olderr t1 t2 t3 f1 f2)
(setq olderr *error* *error* ssx-err t1 T f2 'f1)
(while t1
  (initget "Block Color Entity LAyer LType Style Thickness")
  (setq t1 (getkword
     "\n>>Block name/Color/Entity/LAyer/LType/Style/Thickness: "))
  (setq t2
     (cond
        ((eq t1 "Block")      2)   ((eq t1 "Color")     62)
        ((eq t1 "Entity")     0)   ((eq t1 "LAyer")      8)
        ((eq t1 "LType")      6)   ((eq t1 "Style")      7)
        ((eq t1 "Thickness") 39)))
  (initget 1)
  (setq t3
     (cond
        ((= t2  2)  (getstring "\n>>Block name: "))
        ((= t2 62)  (initget "?")
                    (while
                       (or (eq (setq t3 (getint "\n>>Color number/<?>: ")) "?")
                           (null t3)
                           (> t3 256)
                           (< t3 0))
                           (textscr)
          (princ "\n                                                     ")
          (princ "\n                 Color number   |   Standard meaning ")
          (princ "\n                ________________|____________________")
          (princ "\n                                |                    ")
          (princ "\n                       0        |      <BYBLOCK>     ")
          (princ "\n                       1        |      Red           ")
          (princ "\n                       2        |      Yellow        ")
          (princ "\n                       3        |      Green         ")
          (princ "\n                       4        |      Cyan          ")
          (princ "\n                       5        |      Blue          ")
          (princ "\n                       6        |      Magenta       ")
          (princ "\n                       7        |      White         ")
          (princ "\n                    8...255     |      -Varies-      ")
          (princ "\n                      256       |      <BYLAYER>     ")
          (princ "\n                                               \n\n\n")
                          (initget "?")) t3)
        ((= t2  0)  (getstring "\n>>Entity type: "))
        ((= t2  8)  (getstring "\n>>Layer name: "))
        ((= t2  6)  (getstring "\n>>Linetype name: "))
        ((= t2  7)  (getstring "\n>>Text style name: "))
        ((= t2 39)  (getreal   "\n>>Thickness: "))
        (T          nil)))
  (if t3 (setq f1 (cons (cons t2 t3) f1)))
)
(setq f2 (ssget "x" (eval f2)))
(setq *error* olderr)
(if (and f1 f2) f2 (progn (princ "\n0 found.") (prin1)))
)

;;;   ACADR12.LSP
;;;   Copyright (C) 1992 by Autodesk, Inc.
;;;
;;;   Permission to use, copy, modify, and distribute this software
;;;   for any purpose and without fee is hereby granted, provided
;;;   that the above copyright notice appears in all copies and that
;;;   both that copyright notice and this permission notice appear in
;;;   all supporting documentation.
;;;
;;;   THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED
;;;   WARRANTY.  ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR
;;;   PURPOSE AND OF MERCHANTABILITY ARE HEREBY DISCLAIMED.

;;;=== General Utility Functions ===

(defun *merr* (msg)
  (setq *error* m:err m:err nil)
  (princ)
)

(defun *merrmsg* (msg)
  (princ msg)
  (setq *error* m:err m:err nil)
  (princ)
)

;;;=== AME and Region Modeler Functions ===

(defun ai_setup (len area lu mass vol)
  (setq m:err *error* *error* *merrmsg*)
  (ai_loadame)
  (if (not (not SOLUNION))
    (progn
      (sollength len)
      (solareau area)
      (setvar "lunits" lu)
      (princ "\nLength unit is set to ")(princ len)(princ ". ")
      (princ "Area unit is set to ")(princ area)(princ ".\n")
       (if (not (not SOLBOX))
         (progn
            (solmass mass)    ;don't ask for regions
            (solvolume vol)   ;don't ask for regions
            (princ "Mass unit is set to ")(princ mass)(princ ". ")
            (princ "Volume unit is set to ")(princ vol)(princ ".\n")
         )
       )
      (c:soldisplay)
      (c:solwdens)
    )
  )
  (setq *error* m:err m:err nil)
  (princ)
)

(defun ai_upgvar ()
  (setq m:err *error* *error* *merrmsg*)
  (ai_loadame)
  (if (not (not SOLUNION))
    (progn
     (solhangle 45)
     (solhpat "U")
     (solsolidify 3)
     (princ "\nVariables Upgraded. Objects will be automatically solidified.")
    )
  )
  (setq *error* m:err m:err nil)
  (princ)
)

(defun ai_upgprec ()
  (setq m:err *error* *error* *merrmsg*)
  (ai_loadame)
  (if (not (not SOLUNION))
    (progn
      (solupgrade 1)
      (solpurge "bfile")
      (princ "\nAME R1 solids will be converted to Double Precision.")
    )
  )
  (setq *error* m:err m:err nil)
  (princ)
)

(defun ai_scrcomp ()
  (setq m:err *error* *error* *merrmsg*)
  (ai_loadame)
  (if (not (not SOLUNION))
    (progn
      (solamecomp "ame1")
      (princ "\nScript compatibility set to AME R1.")
    )
  )
  (setq *error* m:err m:err nil)
  (princ)
)

(defun ai_loadame ()
  (setq m:err *error* *error* *merrmsg*)
  (if (not SOLUNION)
    (if (or (findfile "region.exp") (findfile "region"))
      (_autoxload "region")
      (_autoxload "ame")
    )
  )
  (setq *error* m:err m:err nil)
  (princ)
)

(defun ai_unloadame ()
  (setq m:err *error* *error* *merrmsg*)
  (if (xunload "ame" nil)
    (progn
      (ai_aloadame)
      (princ "\nAME unloaded.\n")
    )
  )
  (if (xunload "region" nil)
    (progn
      (autoxload "region" '("solidify" "solint" "solsub" "solunion" "solarea"
                            "solmove" "solchp" "solsep" "sollist" "solmassp"
                            "sollength" "solvar" "solmesh" "solwire" "solfeat"
                            "solwdens" "solucs" "solpurge" "ddsolvar"
                            "ddsolmassp" "solamever" "solareau" "solaxcol"
                            "soldelent" "soldisplay" "solhangle" "solhpat"
                            "solhsize" "sollength" "solpagelen" "solrender"
                            "solservmsg" "solsolidify" "solmatcurr")
      )
      (if (or (findfile "ame.exp") (findfile "ame"))
        (ai_amegrey " ")
      )
      (princ "\nRegion unloaded.\n")
    )
  )
  (menucmd "S=X")
  (menucmd "S=S")
  (setq *error* m:err m:err nil)
  (princ)
)

(defun ai_select (/ load)
  (setq m:err *error* *error* *merrmsg*)
  (if (and
        (or (findfile "ame.exp") (findfile "ame"))
        (or (findfile "region.exp") (findfile "region"))
      )
    (progn
      (princ "\nNo modeler is loaded yet. ")
      (princ "Both AME and Region Modeler are available. ")
      (initget "Ame Region" )
      (setq load (getkword "\nAutoload Region/<AME>: "))
      (if (= load "Region")
        (setq app "region")
        (setq app "ame")
      )
    )
  )
  (setq *error* m:err m:err nil)
  (princ)
)

(defun ai_amegrey (action)
  (foreach a '(1 2 4 13 15 16 27 28 33 35 36 44 45 47 50 51)
    (menucmd (strcat "P9." (itoa a) "=" action))
  )
)

(defun ai_aloadame (/ exist_reg)
 (if (null c:solunion)
  (progn
  (setq m:err *error* *error* *merrmsg*)
  (if (or (findfile "region.exp") (findfile "region"))
    (progn
      (setq exist_reg "yes")
      (autoxload "region" '("solidify" "solint" "solsub" "solunion" "solarea"
                            "solmove" "solchp" "solsep" "sollist" "solmassp"
                            "sollength" "solvar" "solmesh" "solwire" "solfeat"
                            "solwdens" "solucs" "solpurge" "ddsolvar"
                            "ddsolmassp" "solamever" "solareau" "solaxcol"
                            "soldelent" "soldisplay" "solhangle" "solhpat"
                            "solhsize" "sollength" "solpagelen" "solrender"
                            "solservmsg" "solsolidify" "solmatcurr")
      )
      (autoxload "ame" '("solbox" "solcone" "solcyl" "solsphere" "soltorus"
                         "solwedge" "solext" "solrev" "solcham" "solfill"
                         "solcut" "solinterf" "soldecomp" "solsubdiv"
                         "solmass" "solvolume" "solsect" "solprof"
                         "solmat" "solin" "solout" "ddsolmat" "solamecomp"
                         "solmass" "solsectype" "solupgrade" "solvolume")
      )
    )
    (autoxload "ame" '("solbox" "solcone" "solcyl" "solsphere" "soltorus"
                       "solwedge" "solext" "solrev" "solidify" "solint"
                       "solsub" "solunion" "solcham" "solfill" "solcut"
                       "solmove" "solchp" "solsep" "sollist" "solmassp"
                       "solarea" "solinterf" "soldecomp" "solsubdiv"
                       "sollength" "solmass" "solvar" "solvolume" "solmesh"
                       "solwire" "solfeat" "solsect" "solprof" "solwdens"
                       "solmat" "solucs" "solin" "solout" "solpurge"
                       "ddsolvar" "ddsolmassp" "ddsolmat" "solamecomp"
                       "solamever" "solareau" "solaxcol" "soldelent"
                       "soldisplay" "solhangle" "solhpat" "solhsize"
                       "sollength" "solmass" "solmatcurr" "solpagelen"
                       "solrender" "solsectype" "solservmsg" "solsolidify"
                       "solupgrade" "solvolume" )
    )
  )
  (if (and
        (null (or (findfile "ame.exp") (findfile "ame")))
        (= exist_reg "yes")
      )
    (ai_amegrey "~")
  )
  (setq *error* m:err m:err nil)
  )
 )
 (princ)
)

;;;=== AVE Render Functions ===

(defun ai_loadaverendr ()
  (if (null c:render)
    (autoxload "averendr" '("render" "light" "scene" "finish" "rpref"
                            "stats" "replay" "saveimg" "rconfig")
    )
  )
  (princ)
)

(defun c:ai_unloadave ()
  (princ "\n")
  (if (xunload "averendr" nil)
    (progn
      (princ "\nRender unloaded.\n")
      (ai_loadaverendr)
    )
  )
  (menucmd "S=X")
  (menucmd "S=S")
  (princ)
)

;;;=== ASE Functions ===

(defun ai_asegrey (action)
  (foreach a '(11 13 14 16 17 19 20 21 23 24 26 27 28 29 30 31 32 33
               34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 50 51)
    (menucmd (strcat "P1." (itoa a) "=" action))
  )
  (if (= action "~")
    (progn
      (setq ai_aseinit_yet nil)
      (menucmd "P1.10= ")
    )
    (menucmd "P1.10=~")
  )
)

(defun ai_aseinit_chk ()
  (menucmd "S=X")
  (if ai_aseinit_yet
    (menucmd "S=ASE")
    (menucmd "S=ASEINIT0")
  )
  (princ)
)

(defun ai_aseinit ()
  (setq m:err *error* *error* *merrmsg*)
  (if (= nil c:aseinit)
    (progn
      (princ "\nAutoCAD SQL Extension")
      (if (and (or (/= nil (findfile "ase"))
                   (/= nil (findfile "ase.exp"))
                   (/= nil (findfile "ase.exe"))
               )
               (/= nil (findfile "ase.lsp"))
          )
        (progn
          (xload "ase")
          (load "ase.lsp")
          (ai_asegrey " ")
          (menucmd "S=X")
          (menucmd "S=ASE")
          (setq ai_aseinit_yet T)
          (princ " loaded.")
          (c:aseinit)
        )
        (progn
          (princ " not loaded.")
          (princ "\nThe ASE files were not found in your search path directories.")
          (princ "\nCheck the installation of the SQL Extension and try again.")
        )
      )
    )
    (progn
      (ai_asegrey " ")
      (menucmd "S=X")
      (menucmd "S=ASE")
      (if (not ai_aseinit_yet)
        (progn
          (if (findfile "ase.lsp")
            (load "ase.lsp")
            (princ "\nASE.LSP not found.  'Quick' commands not available.")
          )
          (c:aseinit)
        )
      )
      (setq ai_aseinit_yet T)
    )
  )
  (setq *error* m:err m:err nil)
  (princ)
)

(defun ai_aseterm ()
  (setq m:err *error* *error* *merrmsg*)
  (if (= ase_errno 0)
    (progn
      (xunload "ase")
      (ai_asegrey "~")
      (menucmd "S=X")
      (menucmd "S=S")
      (princ "\nAutoCAD SQL Extension unloaded.")
    )
  )
  (setq *error* m:err m:err nil)
  (princ)
)

;;; ===== AutoLoad =====

(defun _autoqload (quoi app cmdliste / qapp symnam)
  (setq qapp (strcat "\"" app "\""))
  (mapcar
   '(lambda (cmd / nom_cmd)
      (progn
        (setq nom_cmd (strcat "C:" cmd))
        (if (not (eval (read nom_cmd)))
            (eval
             (read (strcat
                    "(defun " nom_cmd "( / rtn)"
                    "(setq m:err *error* *error* *merrmsg*)"
                    "(if (ai_ffile " qapp ")"
                    "(progn (princ \"\nInitializing...\")"
                    "(_auto" quoi "load " qapp ") (setq rtn (" nom_cmd ")))"
                    "(ai_nofile " qapp "))"
                    "(setq *error* m:err m:err nil)"
                    "rtn)"
                    ))))))
   cmdliste)
  nil
)

(defun autoload (app cmdliste)
  (_autoqload "" app cmdliste)
)

(defun autoxload (app cmdliste)
  (_autoqload "x" app cmdliste)
)

(defun _autoload (app)
; (princ "Auto:(load ") (princ app) (princ ")") (terpri)
  (load app)
)

(defun _autoxload (app)
; (princ "Auto:(xload ") (princ app) (princ ")") (terpri)
  (if (= app "region") (ai_select))
  (xload app)
  (if (= app "region") (ai_amegrey "~"))
)

(defun ai_ffile (app)
  (or (findfile (strcat app ".lsp"))
      (findfile (strcat app ".exp"))
      (findfile (strcat app ".exe"))
      (findfile app)
  )
)

(defun ai_nofile (filename)
  (princ
    (strcat "\nThe file "
            filename
            "(.lsp/.exp/.exe) was not found in your search path directories."
    )
  )
  (princ "\nCheck the installation of the Support Files and try again.")
  (princ)
)


;;;===== AutoLoad LISP Applications =====

(autoload "appload" '("appload"))

(autoload "filter" '("filter"))

(autoload "dline" '("dline" "dl"))

(autoload "3d" '("3d" "ai_box" "ai_pyramid" "ai_wedge" "ai_dome"
                 "ai_mesh" "ai_sphere" "ai_cone" "ai_torus" "ai_dish")
)

(autoload "ddinsert" '("ddinsert"))

(autoload "asctext" '("asctext"))

(autoload "ddattdef" '("ddattdef"))

(autoload "ddattext" '("ddattext"))

(autoload "3darray" '("3darray"))

(autoload "ddmodify" '("ddmodify"))

(autoload "ddchprop" '("ddchprop"))

(autoload "ddview" '("ddview"))

(autoload "ddvpoint" '("ddvpoint"))

(autoload "mvsetup" '("mvsetup"))

(autoload "ddosnap" '("ddosnap"))

(autoload "ddptype" '("ddptype"))

(autoload "dducsp" '("dducsp"))

(autoload "ddunits" '("ddunits"))

(autoload "ddgrips" '("ddgrips"))

(autoload "ddselect" '("ddselect"))

(autoload "ddrename" '("ddrename"))

(autoload "rman_dcl" '("rmmenu"))

(autoload "ddsolprm" '("ddsolprm"))

(autoload "plud" '("plud"))

;;;===== AutoXLoad ADS Applications =====

(autoxload "rasterin" '("gifin" "pcxin" "riaspect" "ribackg"
                        "riedge" "rigamut" "rigrey" "rithresh" "tiffin")
)

(autoxload "geomcal" '("cal"))

(autoxload "geom3d" '("mirror3d" "rotate3d" "align"))
(princ)





번호 제목 글쓴이 날짜 조회 수
공지 ★ 드림플러스 질문은 메일 또는 홈페이지에 부탁합니다 ★ 아저씨 2017.05.16 3503
공지 제목이 엉망이면 답변달지 않습니다. [1] 아저씨 2014.04.04 24576
공지 순수 캐드 질문은 고캐드로 아저씨 2013.05.28 69487
공지 질문 답변 게시판을 만들었습니다. 아저씨 2013.02.09 75647
877 cad 계산기에서 " 304+506" = 810 ▷ 답변은 "1.304+1.506 = 2,810 이렇게 나오는데. [3] 탱글아바이 2014.12.30 194
876 다중 플롯 관련 질문입니다. [1] 디자이노 2014.12.29 117
875 캐드 2009 [2] 캐드초보 2014.12.26 146
874 2014오토캐드를 사용하고 있습니다 [1] 은지아빠 2014.12.24 393
873 다중플롯 폼 관련 질문 드립니다 [1] luckydan 2014.12.24 156
872 숨겨진 모듈에서 컴파일 오류가 발생하였습니다. [1] 김윤상 2014.12.23 704
871 죄송한데 다시 여쭤볼께요.. [1] 츠래이 2014.12.23 85
870 [polyline 의 구간별 치수가 text 로 표현 되는 리습.] [2] 변선배 2014.12.22 333
869 도면 일괄처리 기능이 있는지 혹시나 해서 여쭈어봅니다. [1] 김철중 2014.12.22 239
868 64비트 윈도우에 오토캐드2012 드림설치하고싶어요 [1] 김만덕 2014.12.19 1477
867 숨겨진 모듈에서 컴파일 오류가 발생했습니다...ㅠ_ㅠ [1] ssancho88 2014.12.17 716
866 pdf 변환 질문입니다. [3] 와니 2014.12.17 766
» 관리자님 안녕 하세요 리습관련 질문좀 드릴까해서 글을 남겨요 [2] 이승준 2014.12.17 1725
864 계획평면도에 횡단면 그리는 명령 있나요? [1] 칼날같은삶 2014.12.16 332
863 드림을 유사 캐드 프로그램에서 사용 할수 있는가 싶어서 질문드립니다. [1] 송송 2014.12.16 293