How can I define a custom BlockType in Simulink

8 views (last 30 days)
Jacques on 23 Feb 2014
Answered: Kaustubha Govind on 10 Jul 2014
When I create a custom block using an S-function, the BlockType of this block, by using
get_param(myblock, 'BlockType')
is displayed as S-Function .
If now I put a mask on my custom block, the block type will be displayed as Reference .
How can I get this to return something like Mycustomblocktype ?
Thank you,
Daniel on 3 Jul 2014
I have the same problem. How can i change BlockType which is always marked as readonly? Currently the BlockType inherit from previous block like subsystem, s-function etc. I need my own types and using an additional attribute is more a hack than a solution for this problem.

Sign in to comment.

Accepted Answer

Jacques on 23 Feb 2014
In fact, Reference was displayed because the library from which the block was taken was not on the path. It had nothing to do with the mask.

More Answers (1)

Kaustubha Govind
Kaustubha Govind on 10 Jul 2014
The BlockType parameter cannot be customized, and is only defined by internal blocks. For your case, perhaps you could use MaskType instead?

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!