Author Topic: How can you run a Lisp routine in a Script file?  (Read 17683 times)

0 Members and 1 Guest are viewing this topic.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

deegeecees

  • Guest
Re: How can you run a Lisp routine in a Script file?
« Reply #16 on: September 29, 2008, 12:14:00 PM »
ya i did that too, it runs on 1 drawings and then stops

Not sure what the problem is. If you still need help, I'll try and test some things when I get a chance.

Andrea

  • Water Moccasin
  • Posts: 2372
Re: How can you run a Lisp routine in a Script file?
« Reply #17 on: September 30, 2008, 12:48:47 PM »
or -> this
Keep smile...

Rooster

  • Guest
Re: How can you run a Lisp routine in a Script file?
« Reply #18 on: November 14, 2008, 08:13:07 AM »
I am making one of my first tentative forays into LISP writing. All I want to do at the moment is to create a LISP to run an existing script of mine.

Here's what it consists of at the moment:

(DEFUN C:LDS200-0 ()
(command "script" "K:\\\\_LDS JOB DATA\\RE_FILES\\DRAWING SCRIPTS\\0_LAYER PROPERTIES.scr")
)

The script is stored on a network drive (hence the additional \\'s). When I run this, I just get an error saying invalid file name. Obviously, I've checked that the path is correct and that everything is spelt right. If I copy the script onto my C drive and change the path in the LISP accordingly, it all works fine. So how can I get my LISP to browse to the script on the network drive??

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: How can you run a Lisp routine in a Script file?
« Reply #19 on: November 14, 2008, 08:54:24 AM »
I guess you'er sure about the double \\?

Have you tried this:
(command "script" "K://_LDS JOB DATA/RE_FILES/DRAWING SCRIPTS/0_LAYER PROPERTIES.scr")
or this:
(command "script" "K:\\/_LDS JOB DATA\\RE_FILES\\DRAWING SCRIPTS\\0_LAYER PROPERTIES.scr")
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Rooster

  • Guest
Re: How can you run a Lisp routine in a Script file?
« Reply #20 on: November 14, 2008, 08:58:28 AM »
Thanks for the reply Alan, but both those lines result in the same error message as before (invalid file name)

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: How can you run a Lisp routine in a Script file?
« Reply #21 on: November 14, 2008, 09:00:50 AM »
BTW welcome to the Swamp.

Just for grins would you try these too.
(command "script" "K:/_LDS JOB DATA/RE_FILES/DRAWING SCRIPTS/0_LAYER PROPERTIES.scr")
or this:
(command "script" "K:\\_LDS JOB DATA\\RE_FILES\\DRAWING SCRIPTS\\0_LAYER PROPERTIES.scr")
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Rooster

  • Guest
Re: How can you run a Lisp routine in a Script file?
« Reply #22 on: November 14, 2008, 09:16:06 AM »
BTW welcome to the Swamp.

Thanks!

And thanks for the other two suggestions - they both worked! Now I have the quandary of which one to use!!

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: How can you run a Lisp routine in a Script file?
« Reply #23 on: November 14, 2008, 09:40:28 AM »
That's a good problem to have. 8-)
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.