Thanks,
Richard
Not sure it will work, but you probably need to use add_block and add_line
with a combination of get_param and set_param in the initalization tab of
the mask editor.
Look at the doc for a simple example:
http://www.mathworks.com/access/helpdesk/help/toolbox/simulink/ug/bryfvlv-1.html
HTH
Arnaud
Hi,
in addition to Arnaud's hints and TMW's docs, I'd also suggest:
1) define a "hidden" - i.e. not shown in the GUI - mask parameter to store the "status" of the block editing/modifying queries, in order to prevent the m-script/function in the mask initialization from re-editing the block every single time it runs (side effects: surely slow response but potentially block/model corruption) and implement some appropriate logic to handle it;
2) careful if you make use of any other mask callback - particularly from parameter fields;
3) consider whether the functionality you'd like to offer is better managed via an s-function, where specific methods allow you to handle the block properties (I/O , interface parameters, state variables, etc.) quite naturally, without the need of "redrawing" a masked subsystem.
HTH
Riccardo
Thanks for the help. I hadn't considered S-Functions, but will take a look at that. I was also considering just having the low level function as a block in a library, and then writing a script that uses add_block to add the correct number of blocks. This might be best because it is likely that the number of wheels will be defined as a variable rather than through the user inputting the value manualy.
Richard