Main Content

padv.util.forceReanalyzeProject

Reanalyze project and log analysis events

    Description

    padv.util.forceReanalyzeProject() forces a reanalysis of the current project by creating backups of the existing artifact database (artifacts.dmr), clearing the existing project analysis, and reanalyzing the project.

    This function requires CI/CD Automation for Simulink Check.

    The function also logs project analysis events, which can help with troubleshooting persistent project analysis issues. Note that when you run the function, the function closes and reopens the project.

    The function creates backup files and detailed logs in the derived folder in the project and creates a ZIP file containing these artifacts for further analysis. The files include:

    • artifacts_no_update.dmr.bak — Backup of the artifacts.dmr file before update

    • artifacts_update.dmr.bak — Backup of the artifacts.dmr file after update

    • artifacts_new.dmr.bak — Backup of the artifacts.dmr file after reanalysis

    • dt_Event_Log.txt — Event log file

    • detailed_logs.txt — Detailed log file

    • logs.zip — ZIP file containing the above files

    Note

    You should only use the function padv.util.forceReanalyzeProject when there are unexpected project analysis issues. When you clear the existing project analysis file, you might permanently lose important information, including the UUIDs that the digital thread assigned to artifacts in your project. Reanalyzing a project might take some time to complete. The artifacts.dmr file might be used by other project users and if you use other tools that use the digital thread, you might need to re-run the metrics in those tools.

    For general task and result cleanup, use runprocess instead. The runprocess function has name-value arguments, Clean and DeleteOutputs, that you can use to clean task results and delete task outputs. For information, see runprocess.