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 CenterFile Exchange에서 Simulink Functions에 대해 자세히 알아보기

제품


릴리스

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by