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 visualizzazioni (ultimi 30 giorni)
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?

Risposta accettata

MathWorks Support Team
MathWorks Support Team il 19 Dic 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

Più risposte (0)

Categorie

Scopri di più su Programmatic Model Editing in Help Center e File Exchange

Prodotti


Release

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by