Jump to content

Export of image of report page


---
 Share

Recommended Posts

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

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

 Share

×
×
  • Create New...