Library dictionary corrupted on re-load
15 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Why might this be happening? I've put some interface definitions in a data dictionary in a separate library. I then have pulled in the library block into a Simulink model. When I do so, it populates the expected entries in the "From Libraries" section in the Model Explorer, but once I save and reload via "load_system" I get the following errors and no access to the relevant variables from the library data dictionary.
Warning: Unable to load graph or digraph object because it was corrupted.
> In Simulink.LibraryDictionary.helperLoadOnDiscLinkageInfoFile
In Simulink.LibraryDictionary.getInstanceOfDependencyInfo
In load_system>i_load_system (line 44)
In load_system (line 20)
Warning: Unable to load graph or digraph object because it was corrupted.
> In Simulink.LibraryDictionary.helperLoadOnDiscLinkageInfoFile
In Simulink.LibraryDictionary.getInstanceOfDependencyInfo
In load_system>i_load_system (line 44)
In load_system (line 20)
From that point on, it seems to be broken unless I clear the cache, and refresh the data dicitonary via:
Simulink.DataDictionary.resetLibraryLinks;
Simulink.DataDictionary.refresh('mymodel.slx');
set_param('mymodel', SimulationCommand='update')
I can get around it for now, by adding the resetting and refreshing to my preload, but I'm concerned that if the interface grows that will slow down the loading of my model.
0 comentarios
Respuestas (1)
Himanshu
el 13 de Ag. de 2024
Hi David,
This was likely a bug in the MATLAB R2023a. I had also faced this issue, and was able to resolve it by upgrading to MATLAB R2023b. As you have already mentioned, a workaround for this is to the run the command:
Simulink.LibraryDictionary.resetLibraryLinks
the documentation for which can be found below:
https://www.mathworks.com/help/simulink/slref/simulink.librarydictionary.resetlibrarylinks.html
0 comentarios
Ver también
Categorías
Más información sobre Programmatic Model Editing en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!