Crazylvan,
I have created the lisp as you have outlined, but get the error message Unknown command "*" . Press F1 for help. I tried to delete it from the lisp and then i get an error message can't find file.
no matter what I do it cannot either find the file or complete the lisp. I have checked the file path several times as well as tried other files in different locations all to present the same result. What am I doing wrong?
Thanks, Duga
bduga,
I know it's been a few months since you last posted, but your post and CrazyIvan's responses helped me out. If you haven't solved your problem, hopefully this will help.
I was having the same "unknown command" issue you mentioned. My solution was to change the backslashes ( \ ) to forward slashes ( / ) in the file path (see slashes in green below).
(DEFUN C:ipt ()
(setq cmde (getvar "cmdecho"))
(setvar "cmdecho" 0)
(command "PSETUPIN" (strcat "J:/autocad/borders/pagesetup-36x24.dwg") "*")
;Import all the Pagesetups
(while (= (getvar "CMDNAMES") "PSETUPIN")
(command "y")
)
(PRINC)
)
I think when you copy and paste the file path from wherever it is on your computer, the slashes are backslashes by default. Changing them to forward slashes fixed it for me.
Good luck!