Borrar filtros
Borrar filtros

Library dictionary corrupted on re-load

15 visualizaciones (últimos 30 días)
David Miller
David Miller el 12 de Ag. de 2024
Respondida: Himanshu el 13 de Ag. de 2024
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.

Respuestas (1)

Himanshu
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

Categorías

Más información sobre Programmatic Model Editing en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by