Changing property 'BlockReduction' is not allowed

조회 수: 12 (최근 30일)
Praveen
Praveen 2018년 2월 2일
답변: Saurabh 2025년 6월 18일
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

답변 (1개)

Saurabh
Saurabh 2025년 6월 18일
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.

카테고리

Help CenterFile Exchange에서 Model Simplification with Dependency Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by