Python scripting PDF reports - General call

Call from Auxiliary Commands


Location of the script


The script can be created for a specific technology and stored in the technology folder of the plugin, or it can be made available for all technologies by storing it in the TechnologyCommon folder of the plugin.

It has to be stored in the path \ Standard\AuxiliaryCommands\OlpProgram.

 

PDF_AuxCommandFileLocation



Script


The script should contain, besides some general settings, a method called ModifyActiveProgram.

 

From this method the report creation can be called.

 

First initialize a member of the ReportUtility (pdf = ReportUtility()) which gives you access to the methods of the class.

 

Now the command can be performed:

  pdf.createAuxCommandsPDFReport(Operator, "")

 

The report is created with its default settings. The user will be asked, where the report file should be stored.

 

PDF_AuxCommandScriptContent



Command execution


How to proceed the PDF report creation using the Auxiliary Commands:

Open the program dashboard in the OLP workbench.

Right mouse click on the program in the list and select the pie command Run auxiliary commands.

Select the PDF Report command in the upcoming window.


PDF_AuxCommandExecution



Report file location


The report creation supports two cases of specifying the target folder where to save the report.

Report without the Costs column

Report including the Costs column.


Report without the Costs column


The usual Windows Save as request dialogue appears with the last executed path and the default file name suggested.


PDF_AuxCommandReportLocation


Report including the Costs column


With the activated Costs column an extended FileSave dialogue appears.

 

It enables the possibility to define:

The report file name and its location folder.

A check box, which overwrites the location folder setting and sets the defined download folder.

The value for costs per meter.

The currency of these costs. A pre-defined string has to be set here.


PDF_AuxCommandReportSave2


The current settings will be always stored.

 

 


Previous
Page précédente
Chapter
Page principale du chapitre
Next
Page suivante