Consider adding an sl_postprocess.m file to your library directory, sl_postprocess - Make postprocessing customizations when building custom block library - MATLAB. It will run as part of your call to ssc_build.
For example, in 25a, you could have a post-processing file with the following content to add the Foundation Resistor block to your custom library:
function sl_postprocess(h)
% Check if the handle is valid
if isempty(h) || ~ishandle(h)
error('Invalid handle provided.');
end
% Add the Simscape Foundation Resistor block to the custom library
try
% Add the Resistor block to the model
add_block('fl_lib/Electrical/Electrical Elements/Resistor', ...
[get_param(h, 'Name') '/Resistor']);
catch ME
error('Failed to add Resistor block: %s', ME.message);
end
end
