TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: CECE_CAD on January 15, 2007, 10:56:58 AM
-
I have a script for our company standard layers that I want all users to use easily. Im trying to load it by a command. I have tried to get it load with this command:
(DEFUN C:asd () (COMMAND "SCRIPT" "K:/Settings/e_proto.scr" ""))
Also I have tried to do it this way: ^C^C-script;k:/settings/e-proto.scr;
For some reason its not loading...? The script loads fine when loading thru the script dialog.
I'm using AutoCAD 2007 Any suggestions?
-
Try:
^C^C-script;"k:/settings/e-proto.scr";
-
I tested it using command and the following works for me:
(command "script" "//d22/Dominic/AutoCAD_Custom/scripts/alert.SCR")
So this should work for you:
(DEFUN C:asd () (COMMAND "SCRIPT" "K:/Settings/e_proto.scr"))
-
when I use that i get this back
Command: asd SCRIPT
Enter script file name <J:\Drawing2.scr>:
"Drawing2.scr": Can't find file.
Command: K:/Settings/e_proto.scr Unknown command "K:/SETTINGS/E_PROTO.SCR".
Press F1 for help.
Command: nil
-
check the spelling of the script name
-
when I put this in the command line: (COMMAND "SCRIPT" "K:/Settings/e_proto.scr") the script loads fine.........? its a little aggervating :|
-
try changing the command portion to vl-cmdf as such:
(defun C:ASD ()
(vl-cmdf "-script" "K:/Settings/e_proto.scr")
)
-
its wierd because I got a strange warning this morning after I installed the CAD Manager tool on my station. The message was telling me to reinstall CAD to make sure all features are working properly. That might be messing this up, I'm going to try a few things and I will let you know what happens
-
the last one worked after i reinstalled, but I change one thing. you had "-script" it didn't like that so i did underscore. Thanks for the help, much appreciated!
(defun C:dsa ()
(vl-cmdf "_script" "K:/Settings/e_proto.scr")
)