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

2013.07.16 16:54

삽질의제왕 조회 수:7994

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

 

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

 

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

 

파일을 열면 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 2756
공지 제목이 엉망이면 답변달지 않습니다. [1] 아저씨 2014.04.04 23846
공지 순수 캐드 질문은 고캐드로 아저씨 2013.05.28 68628
공지 질문 답변 게시판을 만들었습니다. 아저씨 2013.02.09 74940
256 문자내용으로 점찍기 정말 유용합니다. [1] 단순노무자 2013.07.23 2080
255 지형도 횡단 추출 안됩니다. [3] 광팬 2013.07.22 2573
254 드림 xy 좌표사용 문의드립니다. [3] 캐드궁금이 2013.07.22 2063
253 다수개 원 좌표를 선택후 X,Y,Z를 테이브로 나타내는 리습을 찾고 있습니다. [1] 금형쟁이 2013.07.20 2203
252 autocad 다중플롯으로 pdf변환시 한쪽으로 치우침 [5] 고양이집사 2013.07.19 18148
251 CSP 시점변경 명령이 안먹힙니다.~ [1] 헤븐 2013.07.18 1932
250 안녕하세요. 아저씨님..질문한개만 드리겠습니다. ㅜ.ㅜ [2] 모닝짱 2013.07.18 1941
249 Dream에 폴리라인 시점변경이 작동되지 않아요~~ [1] 헤븐 2013.07.18 2158
248 도면축척 질문 답변좀 꼭부탁드리겟습니다.. [3] 캐드허당 2013.07.18 2667
247 드림이 갑자기 안되요!!! 모든 명령어나 아이콘이 알수없다고 나와요 ㅠㅠ [1] 케그다 2013.07.17 5102
» temp.lsp 자꾸 생성이 됩니다. [3] 삽질의제왕 2013.07.16 7994
245 멋진드림 항상 잘쓰고있습니다... 감사합니다... [1] 오리콘 2013.07.16 1984
244 원곡선 선형 IP 그리기에 대해서 질문드립니다. [1] 짱구아범 2013.07.15 2460
243 드림 실행시 치명적 오류로 AUTO CAD 중단 사태가 발생하네요 [1] SUPPJUN 2013.07.13 5434
242 리습 layiso 질문드립니다 [1] azxsw3 2013.07.12 2643