WPerciful Posted October 22, 2013 Posted October 22, 2013 (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 October 23, 2013 by WPerciful Quote
gS7 Posted October 23, 2013 Posted October 23, 2013 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")) Quote
WPerciful Posted October 23, 2013 Author Posted October 23, 2013 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" ) Quote
gS7 Posted October 24, 2013 Posted October 24, 2013 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 Quote
WPerciful Posted October 24, 2013 Author Posted October 24, 2013 That didn't work either. But thank you for your help. Quote
Lee Mac Posted October 24, 2013 Posted October 24, 2013 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? Quote
WPerciful Posted October 24, 2013 Author Posted October 24, 2013 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? Quote
Lee Mac Posted October 24, 2013 Posted October 24, 2013 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. Quote
WPerciful Posted October 24, 2013 Author Posted October 24, 2013 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? Quote
Lee Mac Posted October 24, 2013 Posted October 24, 2013 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. Quote
Lee Mac Posted October 24, 2013 Posted October 24, 2013 I shall update the troubleshooter to include this error message. Updated! 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.