export_printout_report_to#
- dlubal.api.rfem.Application.export_printout_report_to(self, printout_report_no, filepath, export_attributes, model_id=None)#
Exports printout report from the model to the specified file format.
- Parameters:
printout_report_no (int) – Unique identifier of printout report.
filepath (str) – The full path of the file where the model will be exported.
export_attributes (Any) – Specifies the format and attributes for the export. Supported message types: PythonGrpcExportAttributes IfcExportAttributes
model_id (ModelId | None) – The unique identifier of the model. If None, the active model is used.
- Returns:
None
Method Type: Core
Usage
from pathlib import Path
from dlubal.api import common
report_list = rfem_app.get_printout_report_info_list()
print(report_list)
for report in report_list.printout_report_info:
filepath = Path(f"{report.name}.pdf").resolve()
rfem_app.export_printout_report_to(
printout_report_no=report.id,
filepath=str(filepath),
export_attributes=common.printout_report.PdfExportAttributes()
)
using Common = Dlubal.Api.Common;
using Google.Protobuf.WellKnownTypes;
var reportList = rfemApp.get_printout_report_info_list(new Common.OptionalModelId());
Console.WriteLine(reportList);
foreach (var report in reportList.PrintoutReportInfo)
{
var filepath = Path.GetFullPath($"{report.Name}.pdf");
rfemApp.export_printout_report_to(
printoutReportNo: report.Id,
filepath: filepath,
exportAttributes: Any.Pack(new Common.PrintoutReport.PdfExportAttributes())
);
}