Hello Sarm,
Here's how I've used PDFCreator v0.8.0:
1) Install PDFCreator, then configure the auto-save feature: start up the PDFCreator print monitor, then click Printer >> Options. In the "Auto-save" section, configure the directory and hard-code a "known" filename (you'll use this in DIAdem-SCRIPT).
2) In DIAdem-SCRIPT, you can programmatically select which printer you want to print to, then instruct the report to print, then using the "known" filename rename the file to be whatever you want:
' the "known" PDF document filename configured in PDFCreator's options.
known_filename = "D:\david.pdf"
' Select the PDFCreator printer for DIAdem to print to,
' even if it's not the system default printer.
PrintName = "winspool,PDFCreat
or"
' Print all sheets in my report to the "known" PDF document (all sheets are saved in the same PDF file).
PrintRangeType = "AllPages"
Call PicPrint
' Loop until PDFCreator is done creating the "known" PDF document.
Do
fh = TextFileOpen(known_filename, TfExclusive)
Loop while fh = 0
tmpval = TextFileClose(fh)
' the new filename - we'll keep it in the same directory and name it after this channel group and append the date/time.
new_filename = Replace(known_filename, "david.pdf", GroupName(GroupDefaultGet) + Str(Now, "#yyyymmddhhnnss") + ".pdf")
' Rename the "known" PDF document using the new name.
FileRename known_filename, new_filename
I see below that Brad Turpin mentioned some information about the DIAdem beta release, this will be a great new feature!
David Mc.
NI Application Engineer