Your Products have been synced, click here to refresh
Revisiting this thread. What I need right now is for the report to be reviewed by the tech BEFORE it gets printed as a PDF to the network. Is there a way to make the report pop up at the end of the program before the print command?
The dream is for the program to run, have the report pop-up to be reviewed, have a script and or form open to disposition the part, have that info put into the end of the report, then print the report as a PDF to the network.
No biggie, right??
END =GROUP/SHOWALLPARAMS=YES SAVE_REPORT =GROUP/SHOWALLPARAMS=YES $$ NO, -------------------------------------------------------- UPDATE FOLDERPATH inside of "FOLDERPATH" variable below INSIDE THE QUOTATIONS TO ACTUAL REPORT location (COPY AND PASTE FROM FILE EXPLORER ADDRESS BAR (**IN QUOTATION**) E.G. "M:\DMR\CMM PROGRAMS\>cust name<\>part num<\REPORTS" -------------------------------------------------------- ASSIGN/FOLDERPATH="M:\DMR\EPS CMM PROGRAMS\[customer name hidden]\[part name hidden]\REPORTS" WORKPLANE/ZPLUS ASSIGN_FILENAME =GROUP/SHOWALLPARAMS=YES $$ NO, CREATES FILE NAME AND PATH BASED ON INPUTS ASSIGN/MYFOLDER=FOLDERPATH + "\\" + V2 ASSIGN/FILE=MYFOLDER + "/" + GETPROGRAMINFO("PARTNAME") + "_" + V2 + "_" + SYSTIME() + "_" + V1 + ".pdf" ENDGROUP/ID=ASSIGN_FILENAME CREATE_FOLDER =GROUP/SHOWALLPARAMS=YES $$ NO, -------------------------------------------------------------- CREATES THE FOLDER, IF NEEDED. WILL POP UP A WARNING IF FOLDER IS ALREADY CREATED, CLICK OK ON DIALOG BOX TO CONTINUE -------------------------------------------------------------- CS1 =SCRIPT/FILENAME= "M:\DMR\CMM PROGRAMS\_SCRIPTS\CREATE.BAS" FUNCTION/PCDCreatefolder,SHOW=YES,ARG1=MYFOLDER,, STARTSCRIPT/ ENDSCRIPT/ ENDGROUP/ID=CREATE_FOLDER REDRAW =GROUP/SHOWALLPARAMS=YES $$ NO, Redraws the Report Window before saving. CS2 =SCRIPT/FILENAME= "M:\DMR\CMM PROGRAMS\_SCRIPTS\REDRAW.BAS" FUNCTION/Main,SHOW=YES,, STARTSCRIPT/ ENDSCRIPT/ ENDGROUP/ID=REDRAW OUTPUT =GROUP/SHOWALLPARAMS=YES PRINT/REPORT,EXEC MODE=END,$ TO_FILE=ON,OVERWRITE=FILE,AUTO OPEN=ON,$ TO_PRINTER=OFF,COPIES=1,$ TO_DMIS_REPORT=OFF,FILE_OPTION=OVERWRITE,FILENAME=FILE,$ REPORT_THEORETICALS=NONE,REPORT_FEATURE_WITH_DIMENSIONS=NO,$ TO_EXCEL=OFF,$ PREVIOUS_RUNS=DELETE_INSTANCES ENDGROUP/ID=OUTPUT OPEN_RPT =SCRIPT/FILENAME= M:\DMR\CMM PROGRAMS\_SCRIPTS\OPEN_REPORT.BAS FUNCTION/Main,SHOW=NO,ARG1=FILE,, STARTSCRIPT/ ENDGROUP/ID=SAVE_REPORT ENDGROUP/ID=END
' Sub PCDCreateFolder(MyFolder As String) Dim MyFileSysObj, f Set MyFileSysObj = CreateObject("Scripting.FileSystemObject") If Not MyFileSysObj.FolderExists(MyFolder) Then Set f = MyFileSysObj.CreateFolder(MyFolder) Else MsgBox MyFolder & " already exists!", vbExclamation, "PCDCreateFolder" End If End Sub
Sub Main() '************PC-DMIS declarations************ Dim pcdApp As Object Set pcdApp = CreateObject("PCDLRN.Application") Dim pcdPart As Object Set pcdPart = pcdApp.ActivePartProgram Dim pcdReportWindow As Object Set pcdReportWindow = pcdPart.ReportWindow '***********Repaint the report window********* pcdReportWindow.RefreshReport '********************Cleanup********************** Set pcdReportWindow = Nothing Set pcdPart = Nothing Set pcdApp = Nothing End Sub
Sub Main () Dim File As String Shell "C:\Program Files\Adobe\Acrobat DC\Acrobat\Acrobat.exe" & File End Sub
© 2024 Hexagon AB and/or its subsidiaries. | Privacy Policy | Cloud Services Agreement |