diff --git a/matlab/+WBToolbox/BlockInitialization.m b/matlab/+WBToolbox/BlockInitialization.m index 875fee888..751ce8fba 100644 --- a/matlab/+WBToolbox/BlockInitialization.m +++ b/matlab/+WBToolbox/BlockInitialization.m @@ -16,8 +16,8 @@ blockNameSplit = strsplit(currentBlock,'/'); topLevel = blockNameSplit{1}; - % Get all the blocks from the top level of the system - blocks_system = find_system(topLevel,'LookUnderMasks','on','FollowLinks','on'); + % Get all the "Config" blocks from the top level of the system (name of block under mask matching 'ImConfig') + blocks_system = find_system(topLevel,'LookUnderMasks','on','FollowLinks','on','Regexp','on','Name','ImConfig'); % Get the name of the block's subsystem %[blockScopeName,~] = fileparts(blockAbsoluteName);