MATLAB: Problems with programmatically adding ‘TabName’ property value in mask.

simulinksimulink mask interface

I attempted to programmatically add a 'TabName' parameter in my mask interface using the following commands:
mask_obj = Simulink.Mask.get('PRL/array_concat1'); mask_obj.addParameter('Type','popup','TypeOptions',{'Red' 'Blue' 'Green'},'Evaluate','off','TabName','Properties');
However, it doesn't set the tabname and sends the following warning.
Warning: 'TabName' cannot be set for 'PRL/array_concat1' as it will be removed in a future release. Use tab dialog controls to add parameters to tabs
I am currently using version 2014a and the current documentation (<http://www.mathworks.com/help/simulink/slref/simulink.mask.addparameter.html>) explicitely states that it is possible to set the TabName property and there is no mention of this feature being disabled. This capability is very important to me since I have to programmatically create mask interfaces for hundreds of blocks as part of my library development. To add in the tab functionality manually is too painful. Does anyone know a workaround? Why was this feature removed and why does the documentation claim it is still supported? Thanks in advance for your help on this.
Bryan

Best Answer

Try setting the tab names with the following commands:
mask = Simulink.Mask.get('blockpath');
tab = mask.getDialogControl('currentTabName');
tab.Name = 'newTabName'
tab.Prompt = 'My tab'
See the following documentation page for more information regarding creating tabs programmatically http://www.mathworks.com/help/simulink/slref/simulink.mask.adddialogcontrol.html