Forget all known references or find all potentially broken references
Show older comments
I run scripts over multiple models, where the models get loaded in various orders. Assume in model1 there is a reference, that gets resolved, if I load model2 before model1 (get_param(block, 'ReferenceBlock') == 'qlib/...'). If (after a clean start of Matlab) I open only model1 however, the references is broken (get_param(block, 'ReferenceBlock') == 0x0 empty char array).
Is there a way to either:
1: Clear the cache of known references? I tried clear all, bdclose all; close_system; Simulink.LibraryDictionary.clear; Simulink.LibraryDictionary.resetLibraryLinks to no avail. Apparently MATLAB keeps track of known references somewhere else. The only way, I managed was to restart MATLAB.
2. Find out if a Reference is not self-contained, even if currently resolved, i.e. broken without loading some other model? I did not find a good get_param property for this.
Accepted Answer
More Answers (0)
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
