Jump to content

Recommended Posts

Posted

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?

Posted

Maybe something similar to this

"\\\\server\\script folder\\0_LAYER PROPERTIES.scr"

Posted
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

Posted

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 :oops:

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

 

Thanks, but I get exactly the same message....

Posted

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 :P

Posted
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

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

Posted

Does anyone else have any ideas on this?

Posted

Thanks for the tip, but that doesn't solve my problem....

Posted

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?

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

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