Jump to content

Recommended Posts

Posted (edited)

I wanted to write a lisp to set-up a pc for a new user. I wanted to copy the acad.lsp to the autocad support folder with this code:

 

(vl-file-copy "S:\\RSH CAD Core\\ACAD File\\acad.LSP" "C:\\program files\\autodesk\\autocad 2012 - english\\support\\acad.LSP" )

 

But that doesn't work. I can't copy anything into that location. I have tried using the shell command and that doesn't work either. I use the acad.lsp file to load our cadcore routine using this:

 

(load (findfile "CADCore.LSP"))[code]

[/code]

 

Help please

Edited by WPerciful
Posted

Try This way

(vl-file-copy "S:/RSH CAD Core/ACAD File/acad.LSP" (strcat "C:/Documents and Settings/" (getvar "loginname") "/My Documents/acad.LSP"))

Posted

I’m sorry I meant to say that I am trying to copy our acad.lsp file from the network location to AutoCAD support folder.

 

But the code doesn't work:

 

(vl-file-copy "S:\\RSH CAD Core\\ACAD File\\acad.LSP" "C:\\program files\\autodesk\\autocad 2012 - english\\support\\acad.LSP" )

Posted

WPerciful I Don't Think You Can copy Acad.Lsp to Autocad CAD Support Folder ,Try to make ACADDOC.lsp and copy to support folder

Posted

That didn't work either. But thank you for your help.

Posted

A few questions:

 

 

  • Do you have read permissions for the source directory?

 

  • Do you have write permissions for the destination directory?

 

  • Can AutoCAD locate the source file on the network, i.e. does
    (findfile "S:\\RSH CAD Core\\ACAD File\\acad.LSP")

    Return the filepath or nil?

 

  • Does the destination directory definitely exist on the system? i.e. does
    (findfile "C:\\program files\\autodesk\\autocad 2012 - english\\support")

    Return the filepath or nil?

Posted

I have permission for the source directory.

I can locate the source file on the network.

 

If I manually copy the file over to the autocad support folder I get a “Destination Folder Access Denied” dialog box.

If that is what is stopping it, how do I fix it?

Posted
If I manually copy the file over to the autocad support folder I get a “Destination Folder Access Denied” dialog box.

If that is what is stopping it, how do I fix it?

 

That would be the problem -

You will need to get write permissions (administrator privileges) for the destination directory.

Posted

That was it. Thank you very much. :) :) :)

 

On a side note I use your website as a reference aid a lot and it’s been a big help. The Error Message section is awesome . Would you happen to know what kind of error “bad argument type: streamp nil” is?

Posted
That was it. Thank you very much. :) :) :)

 

Excellent - you're welcome!

 

On a side note I use your website as a reference aid a lot and it’s been a big help. The Error Message section is awesome . Would you happen to know what kind of error “bad argument type: streamp nil” is?

 

Thank you - I'm delighted that you find it useful.

 

The error: 'bad argument type: streamp nil' means you have passed a function requiring a file descriptor argument a nil value, for example, passing a null file descriptor argument to the close function:

_$ (close nil)
; error: bad argument type: streamp nil

I shall update the troubleshooter to include this error message.

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...