Hi,
When using HDL coder you can't have masked subsystems under a subsystem with a mask, in other words there can be only one mask in a model. What I would like to do is programmatically copy masks from lower subsystems to the highest level masked subsystem I have. I can use find_system(' modelname ','Mask','on')to find masked blocks and use the commands:
pSource = Simulink.Mask.get( srcBlockName )
pDest = Simulink.Mask.create(destBlockName)
pDest.copy(pSource)
To get a mask and copy a mask from one block to another. However, pDest.copy(pSource) replaces any existing mask. What I would like to do is if masks already exists add the new mask as a separate tab. That way all my masks could be at the top level and exist as separate tabs for "neatness" although not absolutely necessary.
Any help appreciated
Thanks
Stuart
1 Comment
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/114569-copying-simulink-masks-from-multiple-blocks-to-a-single-block#comment_387621
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/114569-copying-simulink-masks-from-multiple-blocks-to-a-single-block#comment_387621
Sign in to comment.