Forgot password?

Create an account!


« back

RhinoScript – script pdf file name, circumventing user input?


Please log in to write a message.

  • 3. Marian0 (Sep 23, 2017 16.44):


    Is there any new insights on how to print a layout from script without user-input for the name required?
    I am trying to set up a system that allows me to print all layouts with their layout names as file names.

    Rhino.Command "-print G"

    I'm always asked for the filename to save the pdf under.
    How is this best approached?

  • 2. Hanno (Mar 08, 2013 09.12):


    I usually solve this situation by printing into a preset file (e.g. MyPath\Temp.pdf) and then renaming it afterwards (so after your "print" command, you will need a loop that waits until the target file exists and then renames it to whatever file name you need).
    I don't know about the Adobe printer, but the printer I use (Bullzip PDF printer) can be set up in a way that it prints always into the same file without asking the user and does not open the file after printing.

    Hope that helps!


  • 1. dingle (Mar 07, 2013 23.32):

    Any way to script the target file path and file name through command line when printing to Adobe PDF? I'm trying to build a batch plot with multiple layer states and worksession files, and this is the last step. I cannot find a way to set the pdf file output destination through the command line - Adobe PDF always prompts the user to key in the file name manually, then press enter.

    Relevant macro code:

    Rhino.Command "-print S D U P Enter Enter G "

    Result before user input prompt:
    Print <Go> ( Go Setup Preview ):

    I've looked into Rhino.SendKeystrokes and VBscript's SendKeys but I might be misunderstanding what they do.

    Thanks for reading. Any help is greatly appreciated.


Why are these buttons gray?