meinfilel Posted August 31, 2023 Share Posted August 31, 2023 Hello, everyone, I've found the following code online and tried to get the paper sizes I'vw created for my custom printing. I've noticed that for some of the papers the command GetCanonicalMediaNames returns wrong numbers; I mean that when inspecting the paper size from plotter manager you get different number than the one returned by the command. Have anyone else noted this behaviour? For example the paper with name "Viva_Print_Katopseis" is 609x655mm while the code returns its size as 609x860mm. Same with "anagnwstaki_topografiko" (609x846 from printer configuration windows vs. 609x900 from the command). I'm attach my .pc3 file hoping it'll make my problem more clear and easier for you to assist me. Thanks in advance! (setvar 'tilemode 0) (setq AcadObj (vlax-get-Acad-Object)) (setq FilesObj (vla-get-Files (vla-get-Preferences AcadObj))) (setq ActLo (vla-get-ActiveLayout (vla-get-ActiveDocument AcadObj))) (setq ActDoc (vla-get-ActiveDocument (vlax-get-Acad-Object))) (vlax-put ActLo 'ConfigName "DWG to PDF.pc3") ; Plotter Name (setq paperList (mapcar '(lambda (x) (cons (vlax-invoke ActLo 'GetLocaleMediaName x) x)) (vlax-invoke ActLo 'GetCanonicalMediaNames) ) ) my_pc3.zip Quote Link to comment Share on other sites More sharing options...
BIGAL Posted September 2, 2023 Share Posted September 2, 2023 (edited) Just a comment do you need to get the media sizes at all ? We had a few PLOT lisp's each hard coded with the correct paper size. That was used in a Plot sequence to plot layouts. (COMMAND "-PLOT" "Y" "" "dwg to Pdf" "ISO A0 (841.00 x 1189.00 MM)" "m" "LANDSCAPE" "N" "E" "F" "C" "y" "Acad.ctb" "Y" "n" "n" "n" pdfName "N" "y" ) You could choose your paper size from a list of sizes see my Multi Radio Buttons.lsp. The main thing is to get a full correct name of the sheet size. When you plot manually look at the sheet size you need to exactly match including spaces or special characters. Even text case. So replace "ISO A0 (841.00 x 1189.00 MM)" with variable sheetname. Sounds also like the Landscape & portrait settings are back to front in your Pc3. You may have Y & X instead of X & Y Edited September 2, 2023 by BIGAL Quote Link to comment Share on other sites More sharing options...
meinfilel Posted September 3, 2023 Author Share Posted September 3, 2023 Thanks for your response. My plots are never standard size (one time i need 860mm the next time 858mm etc) so I want to list all available paper sizes to check if I can select one that exists or I need to make a completely new one. Regarding X and Y, would that cause the difference I noted? Another interesting thing I just found is that when decompressing .pmp (using https://github.com/avbrakel/unzip_pc3) i see this 14{ caps_type=2 name="UserDefinedMetric (609.00 x 860.00MM) localized_name="Viva_Print_Katopseis media_description_name="UserDefinedMetric Portrait 609.00W x 860.00H - (0, 0) x (609, 860) =523740 MM_1_2 media_group=15 landscape_mode=FALSE } but when checking size from plotter I get a different dimension Is there an explanation for that? Thanks again! I'm attaching the decoded txt of my .pmp file. DWG To PDF.pmp.txt Quote Link to comment Share on other sites More sharing options...
BIGAL Posted September 3, 2023 Share Posted September 3, 2023 There was a solution to your request over at Forums/autodesk, it answered the question of various sheet sizes. It was a lengthy response, sorry that's about all I can help with, post your question over there. A question WHY are you using various sheet sizes is not your sheet of paper fixed ? Quote Link to comment Share on other sites More sharing options...
meinfilel Posted September 4, 2023 Author Share Posted September 4, 2023 8 hours ago, BIGAL said: There was a solution to your request over at Forums/autodesk, it answered the question of various sheet sizes. It was a lengthy response, sorry that's about all I can help with, post your question over there. A question WHY are you using various sheet sizes is not your sheet of paper fixed ? Thanks, I'm gonna search it. Only one dimension is fixed (the width of the canon printer). Length usually varies mainly because of maps attached to the drawing each time. Quote Link to comment Share on other sites More sharing options...
exceed Posted September 4, 2023 Share Posted September 4, 2023 how about to read this 1 Quote Link to comment Share on other sites More sharing options...
BIGAL Posted September 5, 2023 Share Posted September 5, 2023 Ok the answer is make some standard sizes, why make a new size to save 20 mm of paper. make say sizes with 50 mm steps you only have to do once. Even the code I talked about just found the size to suit but you have to make each sheet size. Its just one of those things. 1 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.