Author Topic: Plotting not working in lisp.  (Read 453 times)

0 Members and 1 Guest are viewing this topic.

Lonnie

  • Newt
  • Posts: 200
Plotting not working in lisp.
« on: July 03, 2024, 01:25:51 PM »
I am pretty happy with what this does.

Problem is it errors on the plots.


Quote
-plot Detailed plot configuration? [Yes/No] <No>: n
Enter a layout name or [?] <Model>:
Enter a page setup name <>: Enter an output device name or [?] <DCE AutoCAD PDF (General Documentation).pc3>: DCE AutoCAD PDF (General Documentation).pc3
Enter file name <\\dce\projects\2023\Cadd\Red Blue Comparison\2024-07-03 Red Blue Compare\proto-Model.pdf>: red blue
Enter file name <\\dce\projects\2023\Cadd\Red Blue Comparison\2024-07-03 Red Blue Compare\proto-Model.pdf>: n
Enter file name <\\dce\projects\2023\Cadd\Red Blue Comparison\2024-07-03 Red Blue Compare\proto-Model.pdf>: y
Enter file name <\\dce\projects\2023\Cadd\Red Blue Comparison\2024-07-03 Red Blue Compare\proto-Model.pdf>: draworder
Enter file name <\\dce\projects\2023\Cadd\Red Blue Comparison\2024-07-03 Red Blue Compare\proto-Model.pdf>: l
Enter file name <\\dce\projects\2023\Cadd\Red Blue Comparison\2024-07-03 Red Blue Compare\proto-Model.pdf>: Save changes to page setup [Yes/No]? <N> b
Yes or No, please.
AutoCAD variable setting rejected: "clayer" nilSave changes to page setup [Yes/No]? <N>
Proceed with plot [Yes/No] <Y>:
Effective plotting area:  17.96 wide by 48.00 high

I have attached all the files you need ( with the exception of the ctb) to run the lisp.

Here is where I believe are the pertinent part to the lisp lives.

Code - Auto/Visual Lisp: [Select]
  1.  
  2. (defun lm:plt1 (/)
  3.     (command "filedia" 0)
  4.     (command "-plot" "n" "" "" "DCE AutoCAD PDF (General Documentation).pc3" "red blue" "n" "y")
  5.     (command "draworder" "l" "" "b")
  6.     (command "-plot" "n" "" "" "DCE AutoCAD PDF (General Documentation).pc3" "blue red" "n" "y")
  7.   )
  8.  
  9.  

Sometimes it creates both pdf's and puts them in the Documents folder but most of the time it creates the pdf in the with working folder under the default dwg name.

If you download all the parts you have enough to create what I am doing. Which is.
1.  creates folders under the working folder.
2.  copies the correct files into the folder it needs.
3.  saves the opened file in the new folder.
4. asks for files to exref
5.  changes the colors of all the layers in each xref.
6.  Plots the files the way they need seen.

Code - Auto/Visual Lisp: [Select]
  1.   (lm:rdy)
  2.   (lm:step1)
  3.   (lm:step2)
  4.   (lm:plt1)
  5.  

As always thanks for looking.



« Last Edit: July 03, 2024, 04:27:08 PM by Lonnie »

BIGAL

  • Swamp Rat
  • Posts: 1471
  • 40 + years of using Autocad
Re: Plotting not working in lisp.
« Reply #1 on: July 03, 2024, 09:28:08 PM »
A different method its hard coded for a layout title block, ctb and output eg PDF, you welcome to use, just edit relevant values. It svaes the pdf's to a pdf directory under the drawing location. Save the Multi getvals.lsp to a support path or edit the (load to include full path.





A man who never made a mistake never made anything