Filter löschen
Filter löschen

How do I delete a Simulink template?

7 Ansichten (letzte 30 Tage)
Charles Refvem
Charles Refvem am 15 Okt. 2019
Kommentiert: 裴国彪 am 12 Okt. 2022
I created a Simulink template that I no longer wanted to show on my "Simulink Start Page" so I deleted the .sltx file. Now I am getting the following error (pretty much continuously)
Warning: An error has occurred during refresh of Action named createNewBlankModelAction.
Warning: Generator should return a DAStudio.ToolSchema.
Warning: Error reading file "C:\Users\Charlie\Documents\MATLAB\ME322_326_Blank_Model.sltx". Failed to open reader with error: Package does not exist
Do I need to do something in Simulink so that it stops looking for this template file?

Akzeptierte Antwort

Robert Lipham
Robert Lipham am 26 Apr. 2020
I think I found the cause of the problem and a solution.
The reason this warning shows up is because MATLAB is looking for the default model template, but the file does not exist. In order to fix this you need to give it the location of a new default model template file.
Here is the code I used to fix the error on my machine. It resets the Simulink default template model to the factory version provided by MATLAB.
filename = Simulink.findTemplates('factory_default_model');
Simulink.defaultModelTemplate(char(filename));
  2 Kommentare
Charles Refvem
Charles Refvem am 27 Apr. 2020
Success! Thank you.
It seems easy enough for the devs to include logic that checks for a default template and then reverts back to the factory default if it finds the file missing.
Robert Lipham
Robert Lipham am 27 Apr. 2020
I think that might cause some issues if you are missing files unintentionally. Though you would think a total re-install would default to the factory template.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (4)

Alessandro
Alessandro am 29 Okt. 2019
I am facing the same problem, please Mathworks staff clarify this issue ...

Paul King
Paul King am 6 Feb. 2020
Bearbeitet: Paul King am 6 Feb. 2020
I have checked and the template file that it is complaining about does exist
Any ideas anyone ??

Sviatoslav Klos
Sviatoslav Klos am 7 Feb. 2020
Hi guys,
I am facing the same. For now I am dealing with it with the use of warning off; command in command window. Then, it is not disturbing me ;)
It might be so that you have to run the command every time you lunch MATLAB or automate this thing in some way.

Srimouli Rukmabhatla
Srimouli Rukmabhatla am 26 Mär. 2020
Hi,
You can remove the template from Simulink start page, Navigate to template location specified in template details and delete the template .For more information about templates refer the documentation https://www.mathworks.com/help/simulink/ug/create-a-template-from-the-current-project.html
  3 Kommentare
Robert Lipham
Robert Lipham am 14 Apr. 2020
Bearbeitet: Robert Lipham am 26 Apr. 2020
This answer does not address the issue. Further, I'm still having this issue even after resinstalling MATLAB in its entirety. MATLAB seems to be looking for a Simulink template file even though it has been removed. The refresh action seems to occur each time something major happens in Simulink (like opening a new Simulink file or closing Simulink).
裴国彪
裴国彪 am 12 Okt. 2022
This can only delete the template file only, the group name is still in Startup Page.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Interactive Model Editing finden Sie in Help Center und File Exchange

Produkte


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by