The 'rmi' command is expected to return the requirements associated with that block but not the requirements associated with a library reference block. This is the reason for this behavior.
To get the requirements linked to a library block, you can adapt your MATLAB code similar to the following:
libBlk = get_param(gcbh,'ReferenceBlock');
if isempty(libBlk)
out = rmi('get', gcbh);
else
out = rmi('get', libBlk);
end
Best Answer