Error when running Lisp routine

First, I don't know much about Lisp. I have had the BLK2XL.lsp routine for a while, and it used to work on Release 13. Now I'm using R2000 and I get errors, which I think has to do with spaces being in the path filename but I don't know how to fix it. With the original or revised Lisp routine, I get the following error after running the Lisp routine:
; error: no function definition: APPINIT
==============
Here is the original Lisp file:
(defun C:BLK2XL (/ blk col chnl ct row slset)
(setq row 3)
(setq col 3)
(setq blk (tblnext "BLOCK" 1))
(setq chnl (appinit "excel" "sheet1" "c:\\msoffice\\excel\\excel"))
(while blk
(poke chnl (strcat "r" (itoa row) "c" (itoa col)) (cdr (nth 1 blk)))
(setq slset (ssget "x" (list (nth 1 blk))))
(if (/= slset nil) (setq ct (sslength slset)) (setq ct 0))
(poke chnl (strcat "r" (itoa row) "c" (itoa (+ 1 col))) (itoa ct))
(setq blk (tblnext "BLOCK"))
(setq row (+ row 1))
)
(ddedone)
)
================
Below is the revised lisp routine, which I have replaced the above pathname to reflect the default install location of Excel:
(defun C:BLK2XL (/ blk col chnl ct row slset)
(setq row 3)
(setq col 3)
(setq blk (tblnext "BLOCK" 1))
(setq chnl (appinit "excel" "sheet1" "C:\\Program Files\\Microsoft Office\\Office"))
(while blk
(poke chnl (strcat "r" (itoa row) "c" (itoa col)) (cdr (nth 1 blk)))
(setq slset (ssget "x" (list (nth 1 blk))))
(if (/= slset nil) (setq ct (sslength slset)) (setq ct 0))
(poke chnl (strcat "r" (itoa row) "c" (itoa (+ 1 col))) (itoa ct))
(setq blk (tblnext "BLOCK"))
(setq row (+ row 1))
)
(ddedone)
)
================
Thanks very much for any help.
Reply to
CV
Loading thread data ...
Your error message says it all. There is no function definition for APPINIT.
Reply to
Smackypete
So how would I fix it? I've looked into using the Load command but can't seem to get the right syntax.
Reply to
CV
You need the .lsp file that contains the definition of the APPINIT function:
(defun APPINIT ( ) ... )
If you don't have it, there's nothing anyone here can do to help. ___
Reply to
Paul Turvill
CV, use the Windows "Find" utility and search for ".LSP" files that contain the string "(defun APPINIT". If you get a result, then load that .LSP file.
Reply to
cadmaster

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.