What does this Simulink Modelerror "Compiling the model failed : mech2 InvalidReplacement" mean (and what can I do about it)?

3 views (last 30 days)
I've been running a Simscape Multibody model for the past several weeks slowly adding functionality. This morning my model ran successfully but now after making mostly cosmetic changes (renamed a few blocks, added a couple of scopes, and changed a hard coded parameter to a variable name from the workspace) I am getting this error when updating the diagram:
Compiling the model failed : mech2 InvalidReplacement
None of the blocks in my model are highlighted to indicate where the problem lies. I don't have any variables or blocks named "mech2" and I can't find any reference to this error online. What is this error trying to tell me?
Dan

Answers (1)

Arnav Mendiratta
Arnav Mendiratta on 3 Mar 2017
This error is very generic and happens during compilation of some Simscape blocks where Simulink tries to replace a certain block during compilation phase and it is unable to verify all the connections.
If you have access to MathWorks' Software Maintenance Service, you can reach out to the Technical Support with your model and they would be able to help you figure out cause of this behavior.

Categories

Find more on Applications in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!