Jump to content

Using ACADDOC.lsp, I can't get autoload to function on files that load works on.


Recommended Posts

Posted

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.

Posted

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.

Posted

Thanks Lee Mac! Perhaps that's something you could point out in your tutorial online for future visitors?

Posted
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 :)

Posted

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 ?

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...