Rooster Posted November 13, 2008 Posted November 13, 2008 I am making one of my first tentative forays into LISP writing. All I want to do at the moment is use a LISP to run a script of mine. Here's what it consists of at the moment: (DEFUN C:LDS200-0 () (command "script" "C:\\0_LAYER PROPERTIES.scr") ) The above works fine. However, my problem is that the script above is just a copy of the actual script which is on a networked drive (hosted on a different PC). I cannot get the LISP to locate the script in its actual location. In fact, the only place where the LISP can see the script is when it's directly on my C drive (ie: not even in a folder on my PC's C drive). Am I limited to placing my scripts here directly on my C drive, or is it possible for my LISP to find the script on the network drive? Quote
lpseifert Posted November 13, 2008 Posted November 13, 2008 Maybe something similar to this "\\\\server\\script folder\\0_LAYER PROPERTIES.scr" Quote
Rooster Posted November 13, 2008 Author Posted November 13, 2008 Maybe something similar to this"\\\\server\\script folder\\0_LAYER PROPERTIES.scr" Thanks. I tried that, and the path that AutoCAD looked in is correct, but I end up with an invalid file name error: This line in my LISP.... (command "script" "K:\\\\_LDS JOB DATA\\RE_FILES\\DRAWING SCRIPTS\\0_LAYER PROPERTIES.scr") ....returned this message: "K:\\_LDS JOB DATA\RE_FILES\DRAWING SCRIPTS\0_LAYER PROPERTIES.scr": Invalid file name Quote
Lee Mac Posted November 13, 2008 Posted November 13, 2008 This line in my LISP.... (command "script" "K:\\\\_LDS JOB DATA\\RE_FILES\\DRAWING SCRIPTS\\0_LAYER PROPERTIES.scr") ....returned this message: "K:\\_LDS JOB DATA\RE_FILES\DRAWING SCRIPTS\0_LAYER PROPERTIES.scr": Invalid file name Looks like you're accessing a drive, and not a server location - try beginning with: (command "_script" "K:\\........") I'm not too good with these types of LISPs though - so there is a good chance I may be wrong Quote
Rooster Posted November 13, 2008 Author Posted November 13, 2008 Looks like you're accessing a drive, and not a server location - try beginning with: (command "_script" "K:\\........") I'm not too good with these types of LISPs though - so there is a good chance I may be wrong Thanks, but I get exactly the same message.... Quote
Lee Mac Posted November 13, 2008 Posted November 13, 2008 ok, this may be a long shot, but is there any way of dumping the script file into the ACAD program files (i.e. in with the support files), then include in your code: (command "_script" "0_LAYER PROPERTIES") Not sure if this will work at all, but I know that with inserting blocks, running LISPs, etc etc, if just a filename is specified, ACAD will search some default locations for that file - support files being one of those locations. Worth a go all the same Quote
Rooster Posted November 13, 2008 Author Posted November 13, 2008 ok, this may be a long shot, but is there any way of dumping the script file into the ACAD program files (i.e. in with the support files) I guess I could, but I'm not the only person that uses this script, so it would be a pain to have it in more than one place. Best solution is to have it on the network drive so that everyone can access it & it only needs to get edited in one place etc etc Quote
Lee Mac Posted November 13, 2008 Posted November 13, 2008 I guess I could, but I'm not the only person that uses this script, so it would be a pain to have it in more than one place. Best solution is to have it on the network drive so that everyone can access it & it only needs to get edited in one place etc etc Good point. But now I'm fresh out of ideas Quote
Rooster Posted November 14, 2008 Author Posted November 14, 2008 Does anyone else have any ideas on this? Quote
borgunit Posted November 14, 2008 Posted November 14, 2008 I can throw this out there. Here is a free script program from Autodesk. May help. http://images.autodesk.com/adsk/files/scriptpro.exe Other helpful downloads: http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=4091678&linkID=9240898 Quote
Rooster Posted November 14, 2008 Author Posted November 14, 2008 Thanks for the tip, but that doesn't solve my problem.... Quote
borgunit Posted November 14, 2008 Posted November 14, 2008 I do not really work with scripts much but maybe we are not typing what you are expecting.. try (command "_script" "K:\\0_LAYER PROPERTIES") change the "K" to the drive letter you are using and use double slashes to denote folders any luck? Quote
Rooster Posted November 14, 2008 Author Posted November 14, 2008 I do not really work with scripts much but maybe we are not typing what you are expecting.. try (command "_script" "K:\\0_LAYER PROPERTIES") change the "K" to the drive letter you are using and use double slashes to denote folders any luck? Nope - that doesn't work either, but I have found that using / instead of \ does! So problem solved, hooray!! Thanks all for your suggestions 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.