Jump to content

"Export script" Export to a specified drive


Recommended Posts


I need a little help with a script that can export measuremenreport (PDF) to a specified drive (eg d:/report) and where the file name is the same as project name, and the project name changes depending on which program is executed in the kiosk.

today I use this function, but the problem is that both program and PDF are stored in the same place.

# call of the original function to export ginspect and pdf
Evaluate.EvaluationAnalysis.original__export_results (result)

(project_name, export_path) = Evaluate.Evaluate.export_path_info ()
if not os.path.exists (export_path):
os.makedirs (export_path)

"Kiosk Interface_settings.cfg"

[General Settings / Data Storage]
# SavePath specifies the directory where all files
# created by the Kiosk Interface should be stored
SavePath = d:/report


Link to comment
Share on other sites


Versuch´s mal damit. Ist allerdings ein Script.

import gom

name = gom.app.project.reports['report'].get ('project_name')
#print(name) zur kontrolle
filename = str("D:/Reports/")+(name)+(".pdf") # Laufwerk und Ordner dementsprechend anpassen
#print (filename) zur Kontrolle 

gom.interactive.report.export_pdf (
	reports=[gom.app.project.reports['report'].pages['page 1']])


Link to comment
Share on other sites

Hi Erik

Thanks for the script ?

I have two questions I hope you can help me with

1. when I run the script I get this dialog box

Is it possible to approve (ok) it automatically?



2. If there is no folder with similar project name (file name) like the one the scrip is trying to save, is it then possible to get the script to make a new folder?

something like this: os.makedirs( export_path ) 

Link to comment
Share on other sites


  • Create New...