Changing property 'BlockReduction' is not allowed

3 views (last 30 days)
Praveen
Praveen on 2 Feb 2018
Answered: Saurabh on 18 Jun 2025
i am trying to slice the simulink model using model slicer option in matlab-2017b. But getting below erorr: Changing property 'BlockReduction' is not allowed can anyone please help me what is the root cause of this error and how to resolve? thank you

Answers (1)

Saurabh
Saurabh on 18 Jun 2025
I understand that you are encountering the mentioned error while using the Model Slicer in MATLAB R2017b.
It's because Simulink forbids changing this configuration parameter at runtime. This setting must be defined before initiating the slice.
The root cause is that the 'Model Slicer' attempts to modify the 'BlockReduction' parameter during slice generation, but Simulink restricts changes to that setting once the model is loaded.
To resolve the issue:
Configure 'BlockReduction' Before Slicing.
  1. Open Configuration Parameters.
  2. Navigate to Debug (or Simulation Options) → find Block Reduction setting.
  3. Set it to the preferred mode (on or off) and click Apply.
  4. Alternatively, execute in the Command Window:
set_param('model_name', 'BlockReduction', 'off'); % or 'on'
save_system('model_name');
Restart the Model Slicer: Ensure the model is saved with the new setting before launching Model Slicer again.
This works because Simulink locks certain parameters, including 'BlockReduction', to preserve model integrity during runtime. Changing them post-load triggers the error. By setting the parameter before using the slicer, it avoids runtime violations
I hope this helps.

Categories

Find more on Model Simplification with Dependency Analysis 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!