Why am I receiving the error "SQL error or missing database" when opening a model or using "Quick Insert" after adding a custom library in Simulink in MATLAB R2022b?
28 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
MathWorks Support Team
el 19 de Dic. de 2023
Respondida: MathWorks Support Team
el 3 de En. de 2024
I have added a custom library to the Simulink library browser successfully, but now I am encountering an error every time I open a Simulink model or use Quick Insert (double-click on Simulink canvas), which no longer shows searchable blocks. This is the SQL error that indicates a missing database:
SQL error or missing database C:\Users\username\AppData\Local\Temp\__mw_qi_2460_mw__\__mw_resources_mw__\qi_db\IRYEXT00161_slblocks_master.db. (Expression tree is too large (maximum depth 1000))
I initially suspected this was caused by duplicated block names in my library, so to find the suspected culprit block, I am using "slblocksearchdb", but I still get the following error:
>> slblocksearchdb.trace(true);
>> slblocksearchdb.recreate;
Error using slblocksearchdb.recreate
SQL error or missing database
C:\Users\username\AppData\Local\Temp\__mw_qi_17416_mw__\__mw_resources_mw__\qi_db\IRYEXT00161_slblocks_master.db.
(no such table: BLOCKDETAILSFTS)
Additionally, my colleagues who are using the same library packages do not experience this error.
Why is my Simulink not working correctly after adding a custom library, and what could be causing this SQL error on my machine?
Respuesta aceptada
MathWorks Support Team
el 19 de Dic. de 2023
As the issue is only persistent on your machine, it indicates there are outdated files in the "prefdir" and "tempdir" folders that are interfering with the proper functioning of the library. It is not related to block name duplication.
The solution is to rename the folders, or delete the contents of the folders returned by these commands in the MATLAB Command Window:
>> tempdir
>> prefdir
0 comentarios
Más respuestas (0)
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!