Customizing "Print as PDF.pc3" with lisp

Hi there,
From Lisp, I would like to be able to access this driver and create a paper size with this driver "on the fly" without saving it. Could something like this be possible?
If not possible it would be helpful to:
1. Retrieve a list of existing "custom" paper sizes.
2. Add or delete a paper size.

Thank you in advance for your reply.

Phillip

Comments

  • benjamin schlanz
    edited May 2017

    Hey.

    I was also looking into this and created a lisp of my own for sth similiar. I am using this to batchplot my layouts.

    With the .-PLOT Command you can cycle through the options of the print dialog via lisp.
    At some point (with detailed plot configuration) the command asks you for "Defining the paper size". Unfortunately i dont know if there is a way to "add a specific paper size on the fly", but since print to pdf.pc3 is in-built bricscad and not an external driver there should be a way.
    Maybe you can ask support for this.

    Anyways my lsp for explanation:

    ` (defun C:BatchPlot (/ layouts num)
    (command "SHELL" "mkdir C:\batchplot")

    (setq layouts (layoutlist)); list all paperspace layouts in the drawing
    (setq num 0); zero counter
    (repeat (length layouts); Repeats the plot command on all layouts
    (command ".-PLOT"
    "_N" ;; Detailed plot configuration? [Yes/No] :
    (nth num layouts) ;;Enter a layout name or [?] :
    "" ;;Seiteneinrichtungsname:
    "Adobe PDF_background.pc3" ;;Enter an output device name or [?] :
    "_N" ;;In Datei schreiben?
    "_N" ;;Save changes to page setup [Yes/No]?
    "_Y" ;;Proceed with plot [Yes/No] :

    );; end .-plot
    (setq num (1+ num)); Increment counter
    

    ); end repeat
    ); end function `

  • there is also the vla-plottoFile methode in VisualLisp availlable. This may be intresting if you would like to Plot several drawings. In combination with the dbx methode it isn't nessecary to open the drawings for plot.

  • Thank you Benjamin & Martin,

    Both your replies are helpful and I am most grateful for your input but I see I didn't explain myself fully. My issue revolves around the paper size. Our company seldom works within a defined set of paper size parameters.

    Back when AutoCAD was still a DOS version I created a routine that allowed me to send a plot to the printer by simply selecting the border. Our drawings save the scale within the dwg database. Everything was automated and the CAD staff loved it. One of things I was able to do "on the fly" was to create the paper size.

    However, as Windows evolved I lost that ability. Paper size can only be defined now from within the driver (or PC3 file). I am hoping now that BricsCAD has its own Print to PDF.pc3 file, I might regain that previous functionality.

    Torsten Moses has been very helpful in the past when I've had these odd questions. Perhaps he might be able to shed some light on situation.

    Thank you again for your reply. Enjoy the remainder of your week.

    Sincerely,
    Phillip

  • what does it mean: 'a defined set of paper size parameters.' ?
    for creating pdf files you can define different User defined Paper size format.
    What's your final target?

This discussion has been closed.

Howdy, Stranger!

It looks like you're new here. Click one of the buttons on the top bar to get involved!