Skip to main content

Reports

If the library you interact with creates reports they can be easily accessed via ArupCompute.

Ensure that resultType='simple' is set. This asks ArupCompute to send back report data.

# set up our connection ArupCompute
jobNumber = '00000000' # for testing only - please use a real job number
connection = arupcomputepy.Connection(jobNumber)

# Set calculation details and inputs
calcID = 5460340 # DesignCheck2 > Examples > SimpleCalculation v145.0.17 https://compute.arup.digital/calcs/5460340

variables = {
'ID': 'Test',
'A': 1,
'B': 2
}

# Note: must use 'simple' or 'full' result type to get HTML from library (the default 'mini' just returns numbers to keep response size down)
response = arupcomputepy.MakeCalculationRequest(connection, calcID, isBatch=False, variables=variables, resultType='simple')

html = response.arupComputeReport_HTML

ArupCompute has a PDF printing service that:

  • Takes in HTML data
  • Processes LaTeX typesetting information
  • Adds an Arup border
  • Converts to PDF
warning

This process is computationally demanding and requires sending large files over the network.

Please minimise your use of the PDF printing service e.g. if running a large batch of calculation just send the most important to be PDF printed.

html = response.arupComputeReport_HTML

path = 'full/file/path/to/myReport.pdf'

arupcomputepy.pdf.Create(html, "A.Nonymous", path, replace=True)