Reports & Saving
The ICreateEcucReportApi enables creating an ECU-Configuration report.
Note: If no report settings are set, the defaults will take place.
Use createEcucReport{} to specify the Ecu Configuration report settings and create the report in a scope-like way.
The report gets created after the scope gets closed.
ICreateEcucReportApi is the entry point for setting the Ecu Configuration report settings.
Create Ecu Configuration Report
scriptTask("TestEcucReportCreation", DV_PROJECT) {
code { myPath ->
activeProject {
// Use closure to get access to the ecuc report settings
createEcucReport {
// Set only those options for which to change the default value
outputFilePath myPath // default: <ProjectFolder>/Log/EcucReport.html
addAnnotations true // default: true
overwriteExistingReportFile true // default: true
openReportAfterGeneration false // default: true
}
}
} // code
} // scriptTask
Use createEcucReport() to create an Ecu Configuration report with default settings.
Create Ecu Configuration Report with default settings
scriptTask("TestEcucReportCreation", DV_PROJECT) {
code {
// Use default ecuc report settings
activeProject.createEcucReport()
}
}
Saving a Project
IProject.saveProject() saves the current state including all model
changes of the project to disc.
Opening, modifying and saving a project
scriptTask('taskName', DV_APPLICATION) {
code {
// replace getDpaFileToLoad() with the path to the .dpa file to be loaded
def project = projects.openProject(getDpaFileToLoad()) {
// modify the opened project
transaction {
operations.activateModuleConfiguration(bswDefRef.EcuC)
}
// save the modified project
saveProject()
}
}
}