7/11/2019 3:09 PM | |
Joined: 2/10/2016 Last visit: 4/9/2025 Posts: 2 Rating:
|
Hello, I have problem with one c-script that should save created report to pdf file. I used as basis example that is described on page 2130 SIMATIC WinCC WinCC Engineering V15.1 - Programming reference. (link: https://support.industry.siemens.com/cs/pl/en/view/109755216) In script, I use described in manual function RPJSetJobProps (line 162 in RPJApi.h file). When I use script I receive error: 123 - Error RPJSetJobProps: E1=0x00000835 ; E2= 0x00000000; this is described in RPJErr.h as error number 2101 that is defined as: #define ERR_IS_WINCCFLEXIBLE_PROJECT (line 112 in rpjerr.h file). Visualization is not flexible/Advanced but Professional v15.1. Siemens support wants to buy extended support to debug this script. I will do that but first, want to ask you to check if you see the same error when you try to edit report with RPJSetJobProps function. To export report to PDF file I setted up: 1. Report created in A4 format 2. Two options to generate reports: with printing to printer or only with archiving to file 3. Reports are always archived to csv file Created Script: On screen with trend I added custom button ID=1002. Standard print button ID=21 only prints trend and archive this to csv file. Button ID=1002 generate report file without printing on standard printer. On Event (button ID=1002) I execute VB Script (this works OK, in attachement 2 scripts). Script creates all necessary folders, paths on disk and generates csv file. Next runs scheduler action that set bit that triggers C-Script run. C-Script should runs printjob, sets date range (AbsoluteSelectionFrom, AbsoluteSelectionTo). Next external parser converts created by WinCC Script EMF file (this file is generated to \\PRT_OUT\\EMF) to PDF. All is working as should, but problem is that C-Script not want to setup date range with RPJSetJobProps for PRJSetProperty. If I do not use in C-Script RPJSetProps there is no errors when I run all export but start and end date doesn't match with my time period and I need to create export files with setted up date range. Script outputs debug informations to text file (D:\\debug.txt - line 20 in c-script). When used with RPJSetProps debug looks like this:
Attachmentscripts-files.zip (166 Downloads) |
Last edited by: usenet at: 07/11/2019 15:09:55Last edited by: usenet at: 07/11/2019 15:10:21Last edited by: Jen_Moderator at: 07/12/2019 07:10:16Optimized link. |
|
Follow us on