MATLAB: How to obtain a list of all parameterized links in the model in Simulink 7.9 (R2012a)

simulink

I want to find a list of all parameterized links in my model. I can find these blocks by executing the following command:
set_param(gcs,'LibraryLinkDisplay','all');
However, this stilll requires that I visually inspect every subsystem in a model.

Best Answer

This change has been incorporated into the documentation of Simulink 7.9(R2012a). For previous releases, read below for any additional information:
The link can be identified as parameterized by the existence of a non-empty "LinkData" parameter. As an example refer to the following code:
linkblocks = find_system(modelname,'LinkStatus','resolved'); % "active" links only
linkdata = get_param(linkblocks,'LinkData');
hasdata = ~cellfun('isempty',linkdata);
parameterized_link_blocks = linkblocks(hasdata);