TheSwamp
CAD Forums => CAD General => Topic started by: bfred805 on December 19, 2014, 07:48:48 PM
-
Hello:
I recently developed a LISP and would like it to automatically load into AutoCAD. I've done this numerous times before but this time I am getting errors.
From the Command Line:
Command: (findfile "acaddoc.lsp")
"C:\\program files\\autodesk\\acad_config\\lisp\\acaddoc.lsp"
Command: (findfile "sendtoserver.lsp")
"C:\\program files\\autodesk\\acad_config\\lisp\\sendtoserver.lsp"
I made sure that I have an entry in my acaddoc.lsp file for:
(load "sendtoserver.lsp")
and that my LISP folder is pathed and set as a trusted source in my support file options.
Any thoughts?
I should also note, that if I manually type (load "sendtoserver.lsp") at the command line ACAD only returns:
(Command: sendtoserver.lsp)
instead of the file location as well, which it typically includes.
-
Make a lisp source file named Testit.lsp
Add it to the same location as sendtoserver.lsp
type this at the command line
(load "testit.lsp")
What happens ?
added:
The title of this thread is
"Unknown Command" Error
You don't mention that in the body of the post.
When are you getting this error message ?
-
That testit.lsp code works fine. As do some of the other LISP's that are loaded in the acaddoc.lsp file.
Here is my code:
(defun c:syncfromserver ()
(command "_.shell" "\"C:\\Program Files\\Autodesk\\ACAD_Config\\File Sync\\mirrorservertolocal.ffs_batch\"")
(alert "Files have been downloaded from server!")
(princ)
)
(princ)
When I type the command in AutoCAD or click the button that I created upon restarting the program - my command line returns:
Command: SYNCFROMSERVER Unknown command "SYNCFROMSERVER".
-
That testit.lsp code works fine. As do some of the other LISP's that are loaded in the acaddoc.lsp file.
<... >
Does that mean that 'Some' don't load ?
-
"Some" means all but this one that is in question.
-
I assume the complete file is loading without error.
I have no sensible ideas to solve the issue.
Perhaps add something like this to the end of the file being loaded.
(defun c:syncfromserver
() (command "_.shell" "\"C:\\Program Files\\Autodesk\\ACAD_Config\\File Sync\\mirrorservertolocal.ffs_batch\"") (alert "Files have been downloaded from server!") )
(princ "\n 'syncFromServer' has been loaded")
This should display the message to the commandLine at startup.
I must say that (as described) this is a really weird problem.