How to delete inports of a bus creator using script ?

6 Ansichten (letzte 30 Tage)
Anjali Anju
Anjali Anju am 11 Jul. 2022
Beantwortet: Fangjun Jiang am 12 Jul. 2022
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.

Antworten (1)

Fangjun Jiang
Fangjun Jiang am 12 Jul. 2022
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')

Kategorien

Mehr zu Simulink Coder finden Sie in Help Center und File Exchange

Produkte


Version

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by