I have a library block which is a masked subsystem of a group of blocks. In the dialog parameter callback function accessible by 'mask editor' pane of this block, I modify some parameters of blocks inside it using 'set_param' command. For example, in the attached library "Testlib", I modify the parameter 'SaturateOnIntegerOverflow' of product block inside using dialog callback function using the code below:
flag = get_param(gcb,'SaturateOnIntegerOverflow');products = find_system(gcb,'FollowLinks','on','LookUnderMasks','all','Name', 'Product1');for idx = 1 : length(products) set_param(products{idx},'SaturateOnIntegerOverflow',flag);end
Now, if I use this block in a model, I get the following error whenever I attempt modify the setting.
Error due to multiple causes --> Attempting to override parameters of 'Tesrmodel/lib/Product1' which is inside a library link. --> Error evaluating 'MaskCallback' callback of SubSystem block (mask) 'Testmodel/lib/Product1'. Attempting to override parameters of 'Testmodel/lib/Product1' which is inside a library link.
Best Answer