Problems with programmatically adding 'TabName' property value in mask.
1 回表示 (過去 30 日間)
古いコメントを表示
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
0 件のコメント
採用された回答
Drew Davis
2015 年 6 月 8 日
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
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Author Block Masks についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!