The issue you are facing arises because Simscape Multibody visualization using Mechanics Explorer is not supported when using model references. This is a known limitation, and the warning you are receiving is a direct consequence. However, there are several workarounds you can consider for this:
1. Disable Visualization in the Referenced Model - As the warning suggests, you can turn off the visualization in the Simscape Multibody Explorer configuration pane of the referenced model. This will remove the warning, but you won't be able to visualize the multibody dynamics.
2. Use Logging for Visualization - Instead of Mechanics Explorer, you can log simulation data and use it to visualize the results post-simulation. MATLAB has function like "smwritevideo" for creating animations from logged data.
3. Switch to a Top-Level Model for Visualization - If possible, run the simulation from a top-level model that does not use model references for the multibody component. This way, you can still use Mechanics Explorer for visualization.
4. Custom Visualization - Create a custom visualization using MATLAB graphics or Simulink 3D Animation. This approach requires more effort but can provide flexibility in how the results are visualized.
These workarounds involve some trade-offs between ease of use and the ability to visualize the model. You can choose the one that best fits your needs and workflow.
Please refer to the documentation linked below for better understanding.
I hope this helps.