PDA

View Full Version : Error when running Lisp routine


CV
06-23-2003, 06:52 PM
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.

Smackypete
06-23-2003, 07:00 PM
Your error message says it all. There is no function definition for APPINIT.

CV
06-23-2003, 07:48 PM
So how would I fix it? I've looked into using the Load command but can't
seem to get the right syntax.

"Smackypete" <tomnassird@bentley.net> wrote in message
news:g9PJa.18911$TJ.1070689@twister.austin.rr.com... Your error message says it all. There is no function definition for
APPINIT.

Paul Turvill
06-23-2003, 09:03 PM
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.
___

"CV" <cvaughn@ev1.net> wrote in message
news:vffigs5fbbuhef@corp.supernews.com... So how would I fix it? I've looked into using the Load command but can't seem to get the right syntax. "Smackypete" <tomnassird@bentley.net> wrote in message news:g9PJa.18911$TJ.1070689@twister.austin.rr.com... Your error message says it all. There is no function definition for APPINIT.

cadmaster
06-24-2003, 08:04 AM
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.


"Paul Turvill" <nospam@turvill.com> wrote in message news:<vffmsv4r4o8563@corp.supernews.com>... 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. ___ "CV" <cvaughn@ev1.net> wrote in message news:vffigs5fbbuhef@corp.supernews.com... So how would I fix it? I've looked into using the Load command but can't seem to get the right syntax. "Smackypete" <tomnassird@bentley.net> wrote in message news:g9PJa.18911$TJ.1070689@twister.austin.rr.com... Your error message says it all. There is no function definition for APPINIT.


MyLounge.com Site Map
Forum: Cars, Cell Phone, Database, Games, Home Improvement, IT, Music, School, Sports, Web Design, Web Server, Weight Loss

The MyLounge.com forum is intended for informational use only and should not be relied upon and is not a substitute for any advice. The information contained on MyLounge.com are opinions and suggestions of members and is not a representation of the opinions of MyLounge.com. MyLounge.com does not warrant or vouch for the accuracy, completeness or usefulness of any postings or the qualifications of any person responding. Please consult a expert or seek the services of an attorney in your area for more accuracy on your specific situation. Please note that our forums also serve as mirrors to Usenet newsgroups. Many posts you see on our forums are made by newsgroup users who may not be members of MyLounge.com Term of Service