Imagine we want create a new method to rename my reports, for example using the name of the part + name of the cmm operator + name of cmm + serial number.
The sample below can do it:
Sub main(sPDFFileName As String) Dim oApp As Object Dim oPP As Object Dim oEW As Object Set oApp = CreateObject("PCDLRN.Application") Set oPP = oApp.ActivePartProgram Set oEW = oPP.EditWindow oEW.SetPrintOptionsEx 2, 0, 4, 1, sPDFFileName, 1, False ' 2 = PCD_FILE ' 0 = DMIS_OFF ' 4 = PCD_AUTO ' 1 = ExtNum ' 1 = PCD_PDF ' bHyperReportsInline = False End Sub
When you call this script you will need pass the parameter "sPDFFileName", this will be the name of the PDF file, you can compose it using input comments in side pc-dmis part program.
I know, it's only vb but I like