How to delete inports of a bus creator using script ?

1 回表示 (過去 30 日間)
Anjali Anju
Anjali Anju 2022 年 7 月 11 日
回答済み: Fangjun Jiang 2022 年 7 月 12 日
Hi, how can I delete inports of a bus creator using script ?
Case: I have a bus creator with 100 inports created and I want to delete from inport 96 to inport 100 using matlab script.
Any suggestion/feedback is appreciated.

回答 (1 件)

Fangjun Jiang
Fangjun Jiang 2022 年 7 月 12 日
I tried this on a simple example with 8 inports.
%%
lh=get_param('PathToBusCreator','LineHandles');
in_lh=lh.Inport([6:8]);
bk_hdl=get_param(in_lh,'SrcBlockHandle')
delete_block(bk_hdl)
delete_line(in_lh)
set_param('PathToBusCreator','Inputs','5')

カテゴリ

Help Center および File ExchangeSimulink Coder についてさらに検索

製品


リリース

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by