Same error I am getting while adding "Model Info" block. Also I would like to update the "Model Info" block using m-script.
Thanks & Regards
R.
The Model Info block isn't built-in (it's a subsystem with a mask on top of it), so you need to use a slightly different syntax
>> add_block('simulink/Model-Wide Utilities/Model Info','mysys/myNameName')
Phil.
Regards
R. S.
"Phil Goddard" <philN...@goddardconsulting.ca> wrote in message <ii2dab$saf$1...@fred.mathworks.com>...
Assuming you mean how do you add new properties (rather than change the value of existing properties) then you can do the following:
Assume there is a model info block that already has Description and Model Version displayed, then
>> strExisting = get_param(gcb,'DisplayStringWithTags')
strExisting =
Model Info
%<Description>
%<ModelVersion>
Then is you want to add the Modified Date you'd create a new string
>> strNew = [strExisting,char(10),'%<ModifiedDate>']
strNew =
Model Info
%<Description>
%<ModelVersion>
%<ModifiedDate>
Note that char(10) is the ascii character for carriage return, and that strNew is a row Vector -- it is not a multi-row matrix.
Then to update the display
>> set_param(gcb,'DisplayStringWithTags',strNew); %Insert the new string
>> slcm('UpdateAllCMBlocksInThisModelInit') %Get the block to re-initialize
Phil.
> >> add_block('simulink/Model-Wide Utilities/Model Info','mysys/myNameName')
I am trying to run this in different versions of MATLAB, but in one version 'simulink/Model-Wide Utilities/Model Info' is working while in another version 'Simulink/Model-Wide Utilities/Model Info' .
If you notice, the problem is with writing "Simulink" with either Caps "S" or small "s" in word "Simulink".
How to deal with this problem ?
"raj" wrote in message <ikb6uj$h5t$1...@fred.mathworks.com>...