Jump to content

Recommended Posts

Posted

I have been using the below code for some time with no issues, however my printer was changed and now the 11x17 plot size within the printer is called "Ledger (11 x 17)" and I cant figure out what to do with the white spaces. Can anyone help me with this?

 

 

(DEFUN C:WP (/ size p1 p2 )
(initget "Letter 11x17 ")
(or(setq size (getkword "Paper Size: [Letter/11x17]:<11x17> "))
   (setq size "Letter"))
       (setq p1 (getpoint "\nPick first corner of window: \n"))
       (setq p2 (getcorner p1 "\nPick opposite corner of window: \n")) 
(COMMAND "-PLOT" "YES" "model" "KLP1500_BLACK.pc3" size "INCHES" "LANDSCAPE" "NO" "WINDOW" P1 P2 "FIT" "CENTER" "YES" "monochrome.ctb" "YES" "W" "NO" "NO" "NO")
(PRINC)
)

Posted

Would you mind posting a sample drawing? Ill take a quick look to see if I can add any value to your quandary.

Posted

This printing tool can be used to print a window plot from any drawing. I have attached a test file that I use.

 

 

Also,

in this LISP I have closed the "-plot" function with a NO to the "Continue Plot" line to avoid wasting paper while I test. The issue I have is that I need to send "Ledger (11 x 17)" to the paper size and I can not figure out how to work with the white space in that paper size name. I have tried to modify the name within the printer settings however my IT department will not grant me the proper permissions to do so and they do not understand my need for it.

 

 

Thanks

B-Size Drawing.dwg

Posted

maybe this?

(DEFUN C:WP (/ size p1 p2 )
(initget "Letter 11x17")
(setq size (getkword "Paper Size: [Letter/11x17]:<11x17> "))
(cond ((null size)(setq size "Letter"))
      ((eq size "11x17")(setq size "Ledger 11 x 17"))
)
(setq p1 (getpoint "\nPick first corner of window: \n"))
(setq p2 (getcorner p1 "\nPick opposite corner of window: \n"))
(COMMAND "-PLOT" "YES" "model" "KLP1500_BLACK.pc3" size "INCHES" "LANDSCAPE" "NO" "WINDOW" P1 P2 "FIT" "CENTER" "YES" "monochrome.ctb" "YES" "W" "NO" "NO" "NO")
(PRINC)
)

note: normally the value in the brackets is the default value when the user presses enter, your original code seems to default to the opposite value which I have replicated

Posted

oops missed the brackets

maybe this?

(DEFUN C:WP (/ size p1 p2 )
(initget "Letter 11x17")
(setq size (getkword "Paper Size: [Letter/11x17]:<11x17> "))
(cond ((null size)(setq size "Letter"))
      ((eq size "11x17")(setq size "Ledger [color=red]([/color]11 x 17[color=red])[/color]"))
)
(setq p1 (getpoint "\nPick first corner of window: \n"))
(setq p2 (getcorner p1 "\nPick opposite corner of window: \n"))
(COMMAND "-PLOT" "YES" "model" "KLP1500_BLACK.pc3" size "INCHES" "LANDSCAPE" "NO" "WINDOW" P1 P2 "FIT" "CENTER" "YES" "monochrome.ctb" "YES" "W" "NO" "NO" "NO")
(PRINC)
)

note: normally the value in the brackets is the default value when the user presses enter, your original code seems to default to the opposite value which I have replicated

Posted

That did it... Thanks so much. You did exactly what I was thinking needed to be done however I did not know how to set the condition to change the 11x17 to the Ledger (11 X 17).

 

 

Thank you!

Posted

Sorry I am just getting around to this one, glad you were able to get what you needed! Its a great feeling when you get exactly what you were looking for! Cheers!

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...