TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: pmvliet on May 28, 2004, 03:37:40 PM

Title: lsp to call script files
Post by: pmvliet on May 28, 2004, 03:37:40 PM
Hello,

I am working on my script files for plotting. I am in the process of creating the various scripts for various plotters, paper size etc.

Now I want to have a lisp routine that gets loaded and defines various keystrokes to a set an individual script routine.

Here is my lisp to call the scripts:
Code: [Select]
(defun c:x1 ()
(command "script" "i:\standards\Retail\ClientA\Plot\30x42 pdf.scr")
)
(defun c:x2 ()
(command "script" "i:\standards\Retail\ClientA\Plot\30x42 Bond Tryplot1.scr")
)
(defun c:x3 ()
(command "script" "i:\standards\Retail\ClientA\Plot\1.scr")
)


now when this is loaded, it says
Quote
Command: x3 script
Enter script file name <I:\STANDARDS\retail\Drawing1.scr>:
i:standardsRetailClientaPlot.scr
"i:standardsRetailClientaPlot.scr": Invalid file name.


I don't know if the spaces are allowed or not?
i:\standards\retail\clienta\plot\ is where my script files are located.

The reason why I am not just initiating the script from a button is that not all my users like buttons. I will also create buttons that will call the 2 digit keystroke. I think that is the most well rounded way to go about this.

let me know what is wrong if you can tell...

pieter
Title: lsp to call script files
Post by: Mark on May 28, 2004, 03:48:56 PM
you need to either use two '\\' or one '/' in the path to the .scr i.e.
i:\\standards\\Retail\\ClientA\\Plot\\1.scr"
Title: lsp to call script files
Post by: pmvliet on May 28, 2004, 03:51:27 PM
Boy your quick!!!

I figure I would be waiting until Tuesday being the long weekend... My office is pretty empty and that is the only reason I can work on this stuff right now.
Title: lsp to call script files
Post by: pmvliet on May 28, 2004, 03:55:35 PM
It works like a charm...
I would guess that that is the reason it doesn't work in my toolbar as well??