Borrar filtros
Borrar filtros

Problems with programmatically adding 'TabName' property value in mask.

1 visualización (últimos 30 días)
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

Respuesta aceptada

Drew Davis
Drew Davis el 8 de Jun. de 2015
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
  1 comentario
Bryan
Bryan el 8 de Jun. de 2015
Drew, this works perfectly. Thank you for the link to the documentation as well.

Iniciar sesión para comentar.

Más respuestas (0)

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by