CADWarrior Posted October 2, 2012 Posted October 2, 2012 (edited) Hello everyone, Long time no see. I seem to be having an issue and I can't figure it out. Long story short I made a website that allows a user to assign a USB drive to a company via ID. After the USB drive is registered the (downloadlisp) function inside of MP.Fas will being and download all asigned Lisp/FAS file to said Client. Now it works perfectly for me but a guy at work is having a bit of an issue. I have never seen this error before and i cant seem to find documation on it so its confusing me to say the slightest. Any help on this subject would be great. Sorry in advance for the wall of text. on it so its confusing me to say the slightest. Any help on this subject would be great. Sorry in advance for the wall of text. His - Error Command: (LOAD "E:/Loader.LSP") MP.fas Downloading ... Downloading ... Downloading ... Downloading ... Downloading ...; error: invalid binary file format: bad body(2) Mine - working Command: (LOAD "F:/Loader.LSP") MP.fas Downloading ... Downloading ... Downloading ... Downloading ... Downloading ... MP.fas U-Scale by text.fas U-Scale Block.fas U-Round.fas U-Pdfprint.fas Loader.lsp (vl-load-com) (progn (setq quiet 0) ;; 0 for quiet 1 for alert (setq dirltr (list "A" "B" "C" "D" "E" "F" "G" "H" "I" "J" "K" "L" "M" "N" "O" "P" "Q" "R" "S" "T" "U" "V" "W" "X" "Y" "Z")) (foreach Dir dirltr (if (or (/= (findfile (strcat Dir":\\Loader.lsp")) nil) (/= (findfile (strcat Dir":\\Loader.fas")) nil)) (setq Path Dir) ) ) (setq lload (List )) (foreach file (vl-directory-files (strcat Path ":\\") "*.fas") (setq lload (append lload (list file))) ) (foreach file (vl-directory-files (strcat Path ":\\") "*.lsp") (setq lload (append lload (list file))) ) (Foreach lisp Lload (if (not (or (= (strcase lisp) (strcase "Loader.lsp")) (= (strcase lisp) (strcase "Loader.fas")))) (progn (load (strcat Path ":\\" Lisp)) (if (= quiet 1) (alert Lisp) (princ (strcat lisp "\r\n")) ) ) ) ) (DownloadLisp) (Foreach lisp Lload (if (not (or (= (strcase lisp) (strcase "Loader.lsp")) (= (strcase lisp) (strcase "Loader.fas")))) (progn (load (strcat Path ":\\" Lisp)) (if (= quiet 1) (alert Lisp) (princ (strcat lisp "\r\n")) ) ) ) ) ) New Loader.Lsp (Not Test on his yet works on mine still) (vl-load-com) (progn (setq d (rtos (getvar "CDATE") 2 6) yr (substr d 3 2) mo (substr d 5 2) day (substr d 7 2) ) (setq date (strcat mo "-" day "-" yr)) (setq quiet 0) ;; 0 for quiet 1 for alert (setq dirltr (list "A" "B" "C" "D" "E" "F" "G" "H" "I" "J" "K" "L" "M" "N" "O" "P" "Q" "R" "S" "T" "U" "V" "W" "X" "Y" "Z")) (foreach Dir dirltr (if (or (/= (findfile (strcat Dir":\\Loader.lsp")) nil) (/= (findfile (strcat Dir":\\Loader.fas")) nil)) (setq Path Dir) ) ) (setq lload (List )) (foreach file (vl-directory-files (strcat Path ":\\") "*.fas") (setq lload (append lload (list file))) ) (foreach file (vl-directory-files (strcat Path ":\\") "*.lsp") (setq lload (append lload (list file))) ) (Foreach lisp Lload (if (not (or (= (strcase lisp) (strcase "Loader.lsp")) (= (strcase lisp) (strcase "Loader.fas")))) (progn (load (strcat Path ":\\" Lisp)) (if (= quiet 1) (alert Lisp) (princ (strcat lisp "\r\n")) ) ) ) ) (if (not (vl-registry-read "HKEY_CURRENT_USER\\AutoCADLastLispUpdate")) (vl-registry-write "HKEY_CURRENT_USER\\AutoCADLastLispUpdate" "" Date) ) (if (/= (vl-registry-read "HKEY_CURRENT_USER\\AutoCADLastLispUpdate") Date) (progn (vl-registry-write "HKEY_CURRENT_USER\\AutoCADLastLispUpdate" "" Date) (DownloadLisp) (setq lload (List )) (foreach file (vl-directory-files (strcat Path ":\\") "*.fas") (setq lload (append lload (list file))) ) (foreach file (vl-directory-files (strcat Path ":\\") "*.lsp") (setq lload (append lload (list file))) ) (Foreach lisp Lload (if (not (or (= (strcase lisp) (strcase "Loader.lsp")) (= (strcase lisp) (strcase "Loader.fas")))) (progn (load (strcat Path ":\\" Lisp)) (if (= quiet 1) (alert Lisp) (princ (strcat lisp "\r\n")) ) ) ) ) ) ) ) Edited October 2, 2012 by CADWarrior Killed the format for some reason and new Load.Lsp havent tested it yet so may work Quote
CADWarrior Posted October 2, 2012 Author Posted October 2, 2012 **SOLVED** I would used the command (load "Z:\\MP.FAS") and it would give me the error. But, if I would used the command (load "Z:\\MP.lsp") and it would be fine. So, I figured it something went corrupt in AutoCAD at which point I had him Uninstall and Reinstall AutoCAD. Then I tried to do it again (load "Z:\\MP.FAS") and it still gave me the error. So, the thought came to my head wait this corrupt AutoCAD may have not downloaded it correctly. I then copied my working copy to it again. And, vualla it works perfectly now. He used it for a good 6 hours today with no further issues. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.