hosyn Posted July 17, 2015 Posted July 17, 2015 This code operate ok :: (command "-plot" "Y" "" "DWG TO PDF.PC3" "Iso full bleed A3 (420.00 x 297.00 MM)" "" "L" "" "Window" pt1 pt2 "F" "C" "" "" "" "" "" "" "" ) but when i just changed my printer shows following error: (command "-plot" "Y" "" "HP Deskjet 1280 series.PC3" "Iso full bleed A3 (420.00 x 297.00 MM)" "" "L" "" "Window" pt1 pt2 "F" "C" "" "" "" "" "" "" "" ) the error:: Command: Plot1 Select Lower Left Hand Corner of Plotting Area: Thanks.......Unknown command "Plot1". Press F1 for help. Unknown command "L". Press F1 for help. Unknown command "PP". Press F1 for help. Unknown command "WINDOW". Press F1 for help. Unknown command "F". Press F1 for help. Unknown command "C". Press F1 for help. Unknown command "PP". Press F1 for help. Unknown command "PP". Press F1 for help. Unknown command "PP". Press F1 for help. Unknown command "PP". Press F1 for help. Unknown command "PP". Press F1 for help. Unknown command "PP". Press F1 for help. Unknown command "PP". Press F1 for help. Quote
David Bethel Posted July 17, 2015 Posted July 17, 2015 Try setting CMDECHO to 1 and CMDDIA to 1 in order to debug these. When plotting via (command ) you must have the exact sequence require that particular device. They are not all the same. Also in lieu of a simple "", sometimes using the full parameter value can help. Quote
Commandobill Posted July 17, 2015 Posted July 17, 2015 When using the plot command, try walking through it manually to find the issue, or as David said, make sure you have you command echo on so you can see where the error occurred. Quote
hosyn Posted July 17, 2015 Author Posted July 17, 2015 THIS IS FULL CODE: (defun c:XSX ( ) (setvar 'CMDECHO 1) (setvar 'CMDDIA 1) (setq pt1 (getpoint "\nSelect Lower Left Hand Corner of Plotting Area: ")) (setq pt2 (list (+ 40 (car pt1)) (+ 27.8 (cadr pt1)) 0.)) (prompt "\nThanks.......") (command "-plot" "Y" "" "HP Deskjet 1280 series.PC3" "Iso full bleed A3 (420.00 x 297.00 MM)" "" "L" "" "Window" pt1 pt2 "F" "C" "" "" "" "" "" "" "" ) ;(command "-plot" "Y" "" "DWG TO PDF.PC3" "Iso full bleed A3 (420.00 x 297.00 MM)" "" "L" "" "Window" pt1 pt2 "F" "C" "" "" "" "" "" "" "" ) (princ) ) And this is compltet erorr: Command: XSX Select Lower Left Hand Corner of Plotting Area: Thanks.......-plot Detailed plot configuration? [Yes/No] <No>: Y Enter a layout name or [?] <Model>: Enter an output device name or [?] <EPSON Stylus Photo 1410 Series>: HP Deskjet 1280 series.PC3 Enter paper size or [?] <Letter>: Iso full bleed A3 (420.00 x 297.00 MM) Command: XSX Unknown command "XSX". Press F1 for help. Command: L Unknown command "L". Press F1 for help. Command: XSX Unknown command "XSX". Press F1 for help. Command: Window Unknown command "WINDOW". Press F1 for help. Command: Command: Command: F Unknown command "F". Press F1 for help. Command: C Unknown command "C". Press F1 for help. Command: XSX Unknown command "XSX". Press F1 for help. Command: XSX Unknown command "XSX". Press F1 for help. Command: XSX Unknown command "XSX". Press F1 for help. Command: XSX Unknown command "XSX". Press F1 for help. Command: XSX Unknown command "XSX". Press F1 for help. Command: XSX Unknown command "XSX". Press F1 for help. Command: XSX Unknown command "XSX". Press F1 for help. Command: :o:o:o:o:o:o:o:o:o:o:o:o Quote
rlx Posted July 17, 2015 Posted July 17, 2015 make sure the string for your printer and paper size are exactly the same when you try it 'by hand'. use -plot to step through this proces and maybe copy and paste these strings. Sometimes a printer has size 'A3' while another uses 'A3 (420 x 297 mm) and then your code will fail Gr. Rlx Quote
hosyn Posted July 17, 2015 Author Posted July 17, 2015 (edited) GREAT THANXXXXXXXXXXXXX YOUR HELP David Bethel & Commandobill & rlx IT'S OKEY NOW WITHYOUR HELP:):):):):) And are there a way watch preview before plot in above code????? Edited July 17, 2015 by hosyn Quote
rlx Posted July 17, 2015 Posted July 17, 2015 yes there is : http://knowledge.autodesk.com/support/autocad-utility-design/troubleshooting/caas/CloudHelp/cloudhelp/2016/ENU/AutoCAD-ActiveX/files/GUID-6126F7B4-B02D-4EDA-B297-BCCAF6D92ADF-htm.html gr. Rlx Quote
hosyn Posted July 17, 2015 Author Posted July 17, 2015 And if i wanna draw rectangle and plot ---I added rectangle code:: (setq pt1 (getpoint "\nSelect Lower Left Hand Corner of Plotting Area: ")) (setq pt2 (list (-(car pt1) 27. (+ 40 (cadr pt1)) 0.)) (command "._rectang" pt1 pt2 pause) (command "-plot" "Y" "" "DWG TO PDF.PC3" "Iso full bleed A3 (420.00 x 297.00 MM)" "" "P" "" "Window" pt1 pt2 "F" "C" "" "" "" "" "" "" "" ) Just plot and didnt draw rectangle???WHY??? Quote
rlx Posted July 17, 2015 Posted July 17, 2015 why the pause in the rectangle? Think you ment "" (enter) Gr. Rlx Quote
hosyn Posted July 17, 2015 Author Posted July 17, 2015 Thanxxxxxxxxxxxxxx rlx FIXXXXXXXXXXXXXXXXX Quote
BIGAL Posted July 18, 2015 Posted July 18, 2015 hosyn as I posted early each of my plot routines are hard coded for printer name and sheet size so I have 6 plot routines. You could have 1 routine but must ask user so you change the printer name and sheet size. Quote
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.