Why can't I remove reference to simulink in app?
20 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Dan
el 18 de Abr. de 2025
Editada: Walter Roberson
el 22 de Abr. de 2025
I accidently added a Simulink component to my app. I removed the component, but I can't remove the refernece to Simulink.
Why do these 4 lines persist when there is no model? Why isn't there an option to remove Simulink in App Designer? I really don't want to recreate my entire projct.
% Public properties that correspond to the Simulink model
properties (Access = public, Transient)
Simulation simulink.Simulation
end
0 comentarios
Respuesta aceptada
Ranjani
el 22 de Abr. de 2025
Hi Dan,
This issue has been addressed and will be fixed in a future release. In the meantime, as a temporary workaround, you may use the attached p-coded script (From the zip) to resolve the issue. Provide your mlapp to the function "convertSimulinkAppToStandardApp" and this should remove the Simulink reference.
Please note: This workaround is provided as-is and should be used at your own risk. We advise you to create a backup copy of your app before applying the script.
0 comentarios
Más respuestas (2)
SACHIN KHANDELWAL
el 21 de Abr. de 2025
I was able to reproduce the issue on my end.
After removing the Simulink components, I could still see those four lines in the MATLAB App Designer code.
A possible workaround in this case is to export the code to a .m file and recreate the MATLAB app. From the 'Designer' tab of your app, go to Save → Export to .m file.
By doing this, you can modify the .m code and remove the unwanted lines.
I hope this workaround helps resolve the issue.
0 comentarios
Snehal
el 21 de Abr. de 2025
When a Simulink component is added to the design view in App Designer, some additional lines of code are added in the corresponding code viewer. Deleting the Simulink component results in deletion of only some of these code lines, not all.
Since these persistent lines of code cannot be manually deleted from the code-viewer directly, possible workaround could be to export this code as a .m file and then edit this newly saved code file in the MATLAB Editor.
Please follow the steps given below to implement the same:
- Go to ‘Designer’ tab of your app
- Save -> Export to .m file
- Open the exported .m file in MATLAB Editor
- You can edit this newly created file in the Editor
- Click the ‘Run’ button from toolstrip to launch the app directly
For more information please refer to the following MATLAB community discussion:
Hope this helps.
0 comentarios
Ver también
Categorías
Más información sobre Develop Apps Using App Designer 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!