[Lu...] Posted October 29 Share Posted October 29 Hi there, I would like to export images of my report pages as png using the following command: gom.script.report.export_report_image_as_png ( directory='D:/automated_metrology_reports/export', disable_transparency=True, height=1047, images=[gom.app.project.reports['report 1'].pages['page 1'].placeholders['3d_view 1']], use_original_size=True, width=2048) So far my report has 3 pages, called eps1, Unbennant and Thinning. How can I specify which page has to be exported? For me it looks like my report has 3 pages, but I can only export 2 of them using the parameters 'report 2' and 'report 1' in the above comand. Using 'report 3' returns unknown key: "report 3", same for "report 0". Also the connection between the report number and the specific page appears to be random to me. Whats the correct way to get the right page to export the image? Can I use a name tag or anything else to get the right page/image? Thank You very much and best regards, Lukas Link to comment Share on other sites More sharing options...
[Lu...] Posted November 3 Author Share Posted November 3 Talking to the support team, I got the alternative images=[gom.app.project.reports[0].pages[0].placeholders['3d_view 1']], where gom.app.project.reports[x] gets report page number x. Using the tags 'report x' still seems following a logic I do not understand and some tags dont work as explained above. Maybe anyone knows how that works and can explain that. Thank You very much and best regards, Lukas Link to comment Share on other sites More sharing options...
[Mo...] Posted November 4 Share Posted November 4 Hello Lukas, Here is a code I tried that works with the logic i=0,1,2 for the three report pages. gom.script.report.export_report_image_as_png ( directory = 'C:/Users/iqmoamer/Downloads/Export-report', disable_transparency=True, height=1047, images=[gom.app.project.reports[i].pages['page 1'].placeholders['3d_view 1']], use_original_size=True, width=2048) Best regards Mohamed Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in