MATLAB: Does using masked parameters prompted via checkbox breaks reusability of the subsystem in Simulink 6.3 (R14SP3)

Embedded Codersimulinksimulink coder

In both of the attached models, there are 3 instances of the same subsystem. The subsystem has been configured to generate reusable function. The subsystem is masked with 2 parameters. Of the 2 parameters, "b" is logical and is used to define the value of a constant block in the subsystem.
In mask_editbox.mdl, the mask of the subsystem prompts for "b" using an edit box. To pass in the logical value, user must enter logical (1) for true and logical(0) for false.
In mask_checkbox.mdl, the mask of the subsystem prompts for "b" using a check box. To pass in the logical value, user must enter select for true and clear for false.
Because the contents of all 3 instances of the subsystem are identical, a reusable function is expected to be generated for all 3 subsystems. In both models, 2 of the subsystems set b to false and the other to true.
When generating code for mask_editbox.mdl, one reusable function is created for all 3 subsystems. The logical constant is passed in as an argument to the reusable function as expected.
However, when generating code for mask_checkbox.mdl, one reusable function is created for 2 subsystems with b set to false and a different function is created for the subsystem with b set to true. The reusability is broken because the logical parameter is no longer passed in a an argument to the reusable function. The logical constant is inlined directly in the body of the function.
When I open mask_editbox.mdl and generate code. I notice the following:
1) Only one reusable function "mask_editbox_zzz" is generated.
2) "rtp_b" s an argument to the function.
When I open mask_checkbox.mdl and generate code. I notice the following:
1) Two reusable functions "mask_checkbox_zzz" and "mask_checkbox_zzz2" are generated.
2) The absence of "rtp_b" and the logical value is inlined in the body of the function.

Best Answer

This enhancement has been incorporated in Release 2007a (R2007a). For previous product releases, read below for any possible workarounds:
The ability to generate reusable function from a masked subsystem that prompts tunable paramaters via checkbox or popup is not available in Simulink. This is because our implementation does not pass the parameter prompted via checkbox/popup as an argument of the reusable function.
To work around the issue convert the checkbox/popup type to edit.