hexagon logo

How to set Report options from VB script

I'm working in PC-DMIS 2011 MR1 and trying to get a VB script that will set the report options as we want then dump the report to a PDF. I've gotten the printing to a PDF working but am unable to locate the switches to set in VB. Any clues as to where to look? (was easy in 3.7!)
  • SetPrintOptions(Location, Draft, Filemode, ExtNum)

    Location
    PCD___OFF No destination for printed data.
    PCD_PRINTER Destination for the printed data is printer.
    PCD_FILE Destination for the printed data is a file.
    Location of output.

    Draft
    PCD_ON
    PCD_OFF
    Mode of output to printer.

    Filemode
    PCD_APPEND Appends information to the end of the file.
    PCD_NEWFILE Sends information to a new file.
    PCD_OVERWRITE Overwrites information in the current file.
    PCD_AUTO Automatically increments a numeric extension for the output file name.
    PCD_PROMPT Prompts the user for a filename.
    Naming mode for output file.

    ExtNum
    Used with PCD_AUTO mode naming scheme for output file
  • Thank you vpt.se for your reply. But that is the part of my script that I do have working. The part that I cannot find is the setting of the switches in the edit object window that pops up when you right click in the report window.
    The check boxes are: Show Features, Show Alignments, Show Comments, Show Header/Footer, Show Screen Captures.
    Then for the Dimensions section a check box for Show. Radio buttons for All, Out of Tolerance Only & Dimensions outside limits. And a check box for Use Text Mode Dimension Reporting. It is the check boxes & radio buttons that I want to access from VB and set consistent from the script.
  • Never dealt much with reports through automation, one idea could be to create different custom reports where you have made the different changes already and load that report template through automation.
  • So I have to rename all my File names.
    So I Save As File name: New name.
    No problem.

    Now for saving the report as a .pdf.

    So I want to save the New name.pdf.

    So I

    Click File.

    Click Printing.

    Click Report window print setup.

    So I select Prompt.

    The Save As window pops up.
    The File name: populates automatically with Old name.pdf.

    Is there a way to correct this?
    Is there a way to automatically pre-populate the File name: with the New name?

    Is there a way to automatically change the path to the network drive?
    Maybe some visual basic?

    Instead of manually selecting the network drive?

    Thanks in advance.