temp.lsp 자꾸 생성이 됩니다.

2013.07.16 16:54

삽질의제왕 조회 수:7996

우선 드림 감사히 쓰고 있다는 말씀 올리구요 ( _ _ ) 꾸벅

 

여기다 이런 질문 올려도 되는지는 모르겠으나 아저씨께서 캐드바이러스 잡는 것도 소개를 해주신 터라

 

염치불구 하고 여쭙고자 합니다.

 

파일을 열면 temp.lsp 파일이 자꾸 생성이 되고 동일 폴더에 있는 파일을 열면

 

ESC 버튼을 미친듯이 눌러주면 그제서야 파일이 열리는 현상이 반복되네요

 

예전에 acad2010.lsp 파일안에 몇 줄짜리 텍스트 파일 붙여넣어 바이러스 방지하는걸 잘 쓰고 있는데요

 

이것도 이런 식으로 가능하지 않을까 해서요

 

제 사용환경은 회사에서 네트워크 버전 acad2010 32bit 입니다.

 

아래는 temp.lsp 파일 내용입니다.

 

*****************************

 

 

; Next available MSG number is  104
; MODULE_ID ACAD2010doc_LSP_
;;;    ACAD2010DOC.LSP Version 1.0 for AutoCAD 2010
;;;
;;;    Copyright (C) 1994 - 2009 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 the limited warranty and
;;;    restricted rights notice below appear in all supporting
;;;    documentation.
;;;
;;;    AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
;;;    AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
;;;    MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE.  AUTODESK, INC.
;;;    DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
;;;    UNINTERRUPTED OR ERROR FREE.
;;;
;;;    Use, duplication, or disclosure by the U.S. Government is subject to
;;;    restrictions set forth in FAR 52.227-19 (Commercial Computer
;;;    Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
;;;    (Rights in Technical Data and Computer Software), as applicable.
;;;
;;;.
;;;
;;;    Note:
;;;            This file is loaded automatically by AutoCAD every time
;;;            a drawing is opened.  It establishes an autoloader and
;;;            other utility functions.
;;;
;;;    Globalization Note:  
;;;            We do not support autoloading applications by the native
;;;            language command call (e.g. with the leading underscore
;;;            mechanism.)


;;;===== Raster Image Support for Clipboard Paste Special =====
;;
;; IMAGEFILE
;;
;; Allow the IMAGE command to accept an image file name without
;; presenting the file dialog, even if filedia is on.
;; Example: (imagefile "c:/images/house.bmp")
;;
(defun imagefile (filename / filedia-save cmdecho-save)
  (setq filedia-save (getvar "FILEDIA"))
  (setq cmdecho-save (getvar "CMDECHO"))
  (setvar "FILEDIA" 0)
  (setvar "CMDECHO" 0)
  (command "_.-image" "_attach" filename)
  (setvar "FILEDIA" filedia-save)
  (setvar "CMDECHO" cmdecho-save)
  (princ)
)

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

;   R12 compatibility - In R12 (acad_helpdlg) was an externally-defined
;   ADS function.  Now it's a simple AutoLISP function that calls the
;   built-in function (help).  It's only purpose is R12 compatibility. 
;   If you are calling it for anything else, you should almost certainly
;   be calling (help) instead.
 
(defun acad_helpdlg (helpfile topic)
  (help helpfile topic)
)


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

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

;; Loads the indicated ARX app if it isn't already loaded
;; returns nil if no load was necessary, else returns the
;; app name if a load occurred.
(defun verify_arxapp_loaded (app)
  (if (not (loadedp app (arx)))
      (arxload app f)
  )
)

;; determines if a given application is loaded...
;; general purpose: can ostensibly be used for appsets (arx) or (ads) or....
;;
;; app is the filename of the application to check (extension is required)
;; appset is a list of applications, (such as (arx) or (ads)
;;
;; returns T or nil, depending on whether app is present in the appset
;; indicated.  Case is ignored in comparison, so "foo.arx" matches "FOO.ARX"
;; Also, if appset contains members that contain paths, app will right-match
;; against these members, so "bar.arx" matches "c:\\path\\bar.arx"; note that
;; "bar.arx" will *not* match "c:\\path\\foobar.arx."
(defun loadedp (app appset)
  (cond (appset  (or
                     ;; exactly equal? (ignoring case)
                     (= (strcase (car appset))
                        (strcase app))
                     ;; right-matching? (ignoring case, but assuming that
                     ;; it's a complete filename (with a backslash before it)
      (and
          (> (strlen (car appset)) (strlen app))
                      (= (strcase (substr (car appset)
                                          (- (strlen (car appset))
                                             (strlen app)
                                          )
                                  )
                         )
                         (strcase (strcat "\\" app))
                      )
         )
                     ;; no match for this entry in appset, try next one....
                     (loadedp app (cdr appset)) )))
)


;;; ===== Single-line MText editor =====
(defun LispEd (contents / fname dcl state)
  (if (not (setq fname (getvar "program")))
     (setq fname "acad")
  )
  (strcat fname ".dcl")
  (setq dcl (load_dialog fname))
  (if (not (new_dialog "LispEd" dcl)) (exit))
  (set_tile "contents" contents)
  (mode_tile "contents" 2)
  (action_tile "contents" "(setq contents $value)")
  (action_tile "accept" "(done_dialog 1)")
  (action_tile "mtexted" "(done_dialog 2)" )
  (setq state (start_dialog))
  (unload_dialog dcl)
  (cond
    ((= state 1) contents)
    ((= state 2) -1)
    (t 0)
  )
)

;;; ===== Discontinued commands =====
(defun c:ddselect(/ cmdecho-save)
  (setq cmdecho-save (getvar "CMDECHO"))
  (setvar "CMDECHO" 0)
  (command "._+options" 8)
  (setvar "CMDECHO" cmdecho-save)
  (princ)
)

(defun c:ddgrips(/ cmdecho-save)
  (setq cmdecho-save (getvar "CMDECHO"))
  (setvar "CMDECHO" 0)
  (command "._+options" 8)
  (setvar "CMDECHO" cmdecho-save)
  (princ)
)

(defun c:gifin ()
  (alert "\nGIFIN은 더이상 사용되지 않습니다.\nIMAGE 명령을 사용하여 래스터 파일을 부착하십시오.\n")
  (princ)
)

(defun c:pcxin ()
  (alert "\nPCXIN은 더이상 사용되지 않습니다.\nIMAGE 명령을 사용하여 래스터 파일을 부착하십시오.\n")
  (princ)
)

(defun c:tiffin ()
  (alert "\nTIFFIN은 더이상 사용되지 않습니다.\nIMAGE 명령을 사용하여 래스터 파일을 부착하십시오.\n")
  (princ)
)

(defun c:ddemodes()
  (alert "객체 특성 도구막대가 DDEMODES 기능을 병합함.  \nDDEMODES는 더이상 사용되지않음.  \n\n기타 자세한 사항은 도움말 색인에서 DDEMODES를 참조하십시오.")
  (princ)
)

(defun c:ddrmodes(/ cmdecho-save)
  (setq cmdecho-save (getvar "CMDECHO"))
  (setvar "CMDECHO" 0)
  (command "._+dsettings" 0)
  (setvar "CMDECHO" cmdecho-save)
  (princ)
)


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

;;; Check list of loaded <apptype> applications ("ads" or "arx")
;;; for the name of a certain appplication <appname>.
;;; Returns T if <appname> is loaded.

(defun ai_AppLoaded (appname apptype)
   (apply 'or
      (mapcar
        '(lambda (j)
     (wcmatch
               (strcase j T)
               (strcase (strcat "*" appname "*") T)
            )  
         )
  (eval (list (read apptype)))
      )
   )
)

;; 
;;  Native Rx commands cannot be called with the "C:" syntax.  They must
;;  be called via (command).  Therefore they require their own autoload
;;  command.

(defun autonativeload (app cmdliste / qapp)
  (setq qapp (strcat "\"" app "\""))
  (setq initstring "\n초기화 중...")
  (mapcar
   '(lambda (cmd / nom_cmd native_cmd)
      (progn
        (setq nom_cmd (strcat "C:" cmd))
        (setq native_cmd (strcat "\"_" cmd "\""))
        (if (not (eval (read nom_cmd)))
            (eval
             (read (strcat
                    "(defun " nom_cmd "()"
                    "(setq m:err *error* *error* *merrmsg*)"
                    "(if (ai_ffile " qapp ")"
                    "(progn (princ initstring)"
                    "(_autoarxload " qapp ") (command " native_cmd "))"
                    "(ai_nofile " qapp "))"
                    "(setq *error* m:err m:err nil))"
                    ))))))
   cmdliste)
  nil
)

(defun _autoqload (quoi app cmdliste / qapp symnam)
  (setq qapp (strcat "\"" app "\""))
  (setq initstring "\n초기화 중...")
  (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 initstring)"
                    "(_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)
)

 

번호 제목 글쓴이 날짜 조회 수
공지 ★ 드림플러스 질문은 메일 또는 홈페이지에 부탁합니다 ★ 아저씨 2017.05.16 2775
공지 제목이 엉망이면 답변달지 않습니다. [1] 아저씨 2014.04.04 23854
공지 순수 캐드 질문은 고캐드로 아저씨 2013.05.28 68641
공지 질문 답변 게시판을 만들었습니다. 아저씨 2013.02.09 74943
1819 드림 레이어 작업 문의 [2] 김연수 2013.04.01 2471
1818 원곡선 선형 IP 그리기에 대해서 질문드립니다. [1] 짱구아범 2013.07.15 2465
1817 질문 : 드림을 사용시 문제 [2] 하비비 2013.05.05 2461
1816 도면 일괄 처리 → 삽입,Xref에서 xclip 적용된 블록의 유지에 관한 질문 [1] 정윤희 2013.09.25 2453
1815 안녕하세요. 아저씨님 질문좀 드릴게요 [1] spoon 2013.07.25 2442
1814 캐드좌표 엑셀2013순번보내기 패치파일 좀 부탁드려요~ [4] 건설인 2013.04.05 2417
1813 2014에서의 DREAM이 실행이 안되네요~~~~ㅎ [1] 동희아빠 2013.06.15 2415
1812 캐드에서 사용도중 화면이 멈추다가 다시 작동하는 현상은 무엇이 문제인가요 [2] skyblue 2013.07.09 2403
1811 좌표순번내보내기 엑셀2013 부탁합니다. [2] 건설인 2013.05.26 2393
1810 &H80040111(-2147221231)시스템오류발생하였습니다. ClassFactory가 요청한 클래스를 지원할 수 없습니다. 해결방법 [1] 드림사용자 2014.05.19 2386
1809 특정객체 파악하기 [5] 김연수 2013.03.21 2383
1808 VBA 시스템 초기화 중...; 오류: Automation 오류 VBA 매크로 실행 실패 [1] 고맙습니다 2014.05.22 2376
1807 xy좌표쓰기 [1] 심장속사랑 2013.05.27 2373
1806 2012버전 드림사용자입니다 [1] 막내사원 2013.06.21 2366
1805 갑자기 명령어가 안먹네요 [1] 오전동울버린 2013.03.25 2359