Search code examples
data-structuresmodelica

How to turn Dymola package.order warnings into error


Dymola sometimes shows warnings about incorrect package.order (either class found but not listed in package.order, or class listed in package.order but not found on disk). In the end, package.order is duplicate information anyway. That warning is displayed when opening a library, but not when checking or compiling a model.

enter image description here

Is there a way to turn that into an error, instead of warning, to be used in regression testing?
Is there a button/function to let the Dymola fix the package.order file?


Solution

  • You can set Advanced.PedanticModelica=true; before loading the library to turn the warning into error.

    However, it is not guaranteed that message is given when opening the library - (using a scripting function or File>Open>Load) - since classes are normally demand-loaded and if the error is deep down in the hierarchy it may be detected later.

    You can set Advanced.UI.DemandLoadClasses=0; (before loading) to get immediate feedback on the problem even in that case, but it will slow down loading the library.