Absntmind Posted August 20, 2008 Share Posted August 20, 2008 Hello all. I have a simple print lisp routine which does some basic cleanup for wipeouts, then would print. It has been working fine, till now. Me and another have switched offices and are using a different printer (Lanier LD 135 PCL 6), and since, the lisp routine stopped working. If I change back to the old printer it works fine again. Any reason why this could happen? Other people are using this on different printers throughout the office, yet only this new printer is causing problems. I tried changing the lisp to the specific printer as well as system default (what it originally was), and nothing works. Here is the lisp in case it helps. (defun c:ip() (Command "erase" (ssget "_X" '((8 . "Wipeout"))) "") (Command "draworder" (ssget "x" '((0 . "insert"))) "" "Front") (command "wipeout" "Frames" "OFF") (command "regen") (command "-plot" "y" "model" "default windows system printer.pc3" "letter" "inches" "landscape" "no" "limits" "fit" "0.00,0.00" "yes" "invi pipe.ctb" "yes" "a" "n" "n" "y"))(princ) Note: If I type the print routine step by step in the console, everything will work. Just not when run as a lisp (or macro, same effect). Quote Link to comment Share on other sites More sharing options...
TimSpangler Posted August 20, 2008 Share Posted August 20, 2008 Check the paper size. That coused one of our menus to go wonky. The size may be 8.5X11 not Letter?? Just a thought. also make sure you have the paths set to the Plotters and PC3.. etc Quote Link to comment Share on other sites More sharing options...
dbroada Posted August 20, 2008 Share Posted August 20, 2008 I have inconsistency across our office with printers. Some need the ".pc3", others don't while others also need the print server path. Make sure each machine can actually see the correct .pc3 file. Quote Link to comment Share on other sites More sharing options...
Absntmind Posted August 20, 2008 Author Share Posted August 20, 2008 Thanks for the quick reply. I checked the size, and did see it could be typed "Letter (8.5" x 11")", and typing it that way in console using -plot works. Though, the lisp is still not working after that change . I believe the paths are correct, as I can manually select the printer and plot, as well as still use the routine and send to other printers in the building. This is becoming a pain...lol. Quote Link to comment Share on other sites More sharing options...
borgunit Posted August 20, 2008 Share Posted August 20, 2008 Could you post your command box (F2) and let us peek at it (after the program has just ran). Quote Link to comment Share on other sites More sharing options...
Absntmind Posted August 20, 2008 Author Share Posted August 20, 2008 I tried giving it the exact server path, and it worked when plotting through the console. Yet still no luck with the lisp. What do you meen by "seeing the correct .pc3"? Here is what I get after running the lisp. Note: I will sometimes get the unknown command error on other pc's, but then it will still run through it and plot. Command: ip Unknown command "IP". Press F1 for help. 11 Unknown command ")". Press F1 for help. Unknown command "INCHES". Press F1 for help. Unknown command "LANDSCAPE". Press F1 for help. Unknown command "NO". Press F1 for help. 2D point or option keyword required. 2D point or option keyword required. ; error: An error has occurred inside the *error* functionFunction cancelled Reset Model space limits: Thanks for taking the time to help guys Quote Link to comment Share on other sites More sharing options...
T2L Posted August 20, 2008 Share Posted August 20, 2008 There are 2 ways to debbug your code; One, if plotting thru console works, then write a script. Two, if your script works then revised your lisp like this (setq SCR (open "C:yourpath/youscript.scr" "w")) (princ "-PLOT\n" SCR) (princ "Y\n" SCR) ....etc. (close SCR) (Command "script" "yourscript") I've used this and it works. Quote Link to comment Share on other sites More sharing options...
borgunit Posted August 21, 2008 Share Posted August 21, 2008 First things first, The text screen says if does not recognize ip as a command. Either it is not loaded or it could be loaded as (defun ip().... rather than (defun c:ip ()... Check that first Quote Link to comment Share on other sites More sharing options...
alanjt Posted August 22, 2008 Share Posted August 22, 2008 I tried giving it the exact server path, and it worked when plotting through the console. Yet still no luck with the lisp. What do you meen by "seeing the correct .pc3"? Here is what I get after running the lisp. Note: I will sometimes get the unknown command error on other pc's, but then it will still run through it and plot. Command: ip Unknown command "IP". Press F1 for help. 11 Unknown command ")". Press F1 for help. Unknown command "INCHES". Press F1 for help. Unknown command "LANDSCAPE". Press F1 for help. Unknown command "NO". Press F1 for help. 2D point or option keyword required. 2D point or option keyword required. ; error: An error has occurred inside the *error* functionFunction cancelled Reset Model space limits: Thanks for taking the time to help guys the routine is loaded and executing, something is invalid though. looks like it's the pc3 name. run through that portion of the routine, just typing in each sequence at the command line. -plot y model default blah blah (type "?" to see what is available) the name is just set up differently, i'm sure. Quote Link to comment Share on other sites More sharing options...
architecture68-raff Posted August 22, 2008 Share Posted August 22, 2008 The lisp code you posted appears to have mismatched parentheses in the last line. A closing parentheses should also close out the function. Try loading this version of your code to see if it runs properly (defun c:ip () (Command "erase" (ssget "_X" '((8 . "Wipeout"))) "") (Command "draworder" (ssget "x" '((0 . "insert"))) "" "Front" ) (command "wipeout" "Frames" "OFF") (command "regen") (command "-plot" "y" "model" "default windows system printer.pc3" "letter" "inches" "landscape" "no" "limits" "fit" "0.00,0.00" "yes" "invi pipe.ctb" "yes" "a" "n" "n" "y" ) (princ) ) Quote Link to comment Share on other sites More sharing options...
Absntmind Posted August 29, 2008 Author Share Posted August 29, 2008 Sorry for not replying sooner, been a very busy week. Thanks to everyone who helped, I have it working now . I don't know what the "exact" fix was, probably a combination. I added the Plotters folder to my support paths, tried raff's version, and typed it in step by step using the ? key all the way through. I found that with this specific printer, no matter what size you enter in a lisp (or how you type it) it won't take it. So I set the default printers properties to the size I use most, then just used a "" in the lisp. It works quick and clean, though I still get the unknown command error. Command: ip Unknown command "IP". Press F1 for help. Effective plotting area: 7.98 wide by 10.60 high Plotting viewport 2. I am curious as to why it still says unknown command, but as long as it works I'm happy. Thanks again guys. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.