jjatho Posted February 5, 2013 Posted February 5, 2013 in my ACADDOC.lsp file, I have the line: (load "C:\\Dropbox\\Buckner Heavy Lift Cranes\\Scripts\\Actual\\PDFpublish.lsp" "PDFPublish failed to load") which works just fine, and loads the file on startup. I would prefer to use autoload to keep from always loading files I don't need. The following doesn't work though: (autoload "C:\\Dropbox\\Buckner Heavy Lift Cranes\\Scripts\\Actual\\PDFpublish.lsp" '("PDFPublish")) When I try to use it, I get the following: Command: PDFPUBLISH The file C:DropboxBuckner Heavy Lift CranesScriptsActualPDFpublish.lsp(.lsp/.exe/.arx) was not found in your search path folders. Check the installation of the support files and try again.nil Command: So it looks like all the slashes are being stripped out of the file location. I tried to go by this tutorial, so I'm not sure what I'm missing to make autoload fail when load works on the same file. Quote
Lee Mac Posted February 5, 2013 Posted February 5, 2013 This is a bug (one of many) with the autoload function, you will need to use: (autoload "C:/Dropbox/Buckner Heavy Lift Cranes/Scripts/Actual/PDFpublish.lsp" '("PDFPublish")) The in-built autoload function defines the loading function 'stub' for a command by evaluating a concatenated string, however, whoever wrote the autoload function overlooked the need to escape backslashes to avoid them being interpreted as escape sequences. Quote
jjatho Posted February 5, 2013 Author Posted February 5, 2013 Thanks Lee Mac! Perhaps that's something you could point out in your tutorial online for future visitors? Quote
Lee Mac Posted February 5, 2013 Posted February 5, 2013 Thanks Lee Mac! Perhaps that's something you could point out in your tutorial online for future visitors? Will do when I get around to it Quote
BIGAL Posted February 6, 2013 Posted February 6, 2013 Theres lots of times that you have to do the filenames with the slashes reversed its been in Autocad since year dot. If you were running a UNIX box an older version then again the slashes had to be the other way around compared to the operating system. Some one may like to comment about the mac version which way for directory brackets ? 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.