hexagon logo

Auto save serialized pdf report

I have a Basic Script at the beginning of my program that prompts the operator to enter the serial number of a part. Then at the end of the program I have an excel form report being created and auto-saved as the serial number.
I would like to accomplish the same thing but with a PDF report. I can get the PDF to auto-save, but not as the serial number. Below is the end of my program. The green text is where i would assume some type of variable could be placed. Until i get it right i am manually saving. Thanks in Advance guys!



CS2 =SCRIPT/FILENAME= C:\USERS\PUBLIC\DOCUMENTS\HEXAGON\PC-DMIS\2019 R2\REPORT_REFRESH.BAS
FUNCTION/Main,SHOW=YES,,
STARTSCRIPT/
ENDSCRIPT/
ASSIGN/SERI=STR(GETTEXT(193,1,{FILEHEDR}))
ASSIGN/FILENAME=SERI
EXCEL_FORM1=EXCELFORMREPORT/TEMPLATE=H.I.2, TYPE=XLSX
RESULT FOLDER/O:\1Customers\XXXXXX\130XXXXX\Purchase Orders\2611-1
PRINT/REPORT,EXEC MODE=END,$
TO_FILE=ON,OVERWRITE=O:\1Customers\XXXXX\130XXXX 1\Purchase Orders\2611-1\ PN00 SN00.PDF,AUTO OPEN=ON,$
TO_PRINTER=OFF,COPIES=1,$
TO_DMIS_REPORT=ON,FILE_OPTION=APPEND,FILENAME=O:\1 Customers\XXXXXX\13XXXXXX\Purchase Orders\2611-1,$
REPORT_THEORETICALS=NONE,REPORT_FEATURE_WITH_DIMEN SIONS=NO,$
TO_EXCEL=OFF,$
PREVIOUS_RUNS=DELETE_INSTANCES
Parents Reply Children
No Data