Simulink.B​lockDiagra​m.arrangeS​ystem does not work inside library

조회 수: 6 (최근 30일)
Manuel K
Manuel K 2022년 11월 30일
편집: Manuel K 2022년 12월 1일
Hello,
I'm using the command:
Simulink.BlockDiagram.arrangeSystem(gcb,FullLayout='true');
to sort and rearrange the blocks inside a masked subsystem. This worked fine until I converted this subsystem into a library block.
Now this command does nothing and the internal structure remains cluttered and unreadabel. Because this blocks heavily modifies itself, I can't establish a pleasant alignment beforehand.
Is there any way to get this working?
  댓글 수: 4
Fangjun Jiang
Fangjun Jiang 2022년 11월 30일
Sorry, to be acurate, for the library block, I shall refer it as "is the LinkStatus inactive".

댓글을 달려면 로그인하십시오.

답변 (1개)

Fangjun Jiang
Fangjun Jiang 2022년 11월 30일
I've tried it. You need to disable the library link first.
set_param(gcb,'LinkStatus','inactive')
Simulink.BlockDiagram.arrangeSystem(gcb,FullLayout='true')
  댓글 수: 2
Manuel K
Manuel K 2022년 12월 1일
Although that's working, I don't want to keep the 'LinkStatus' in the 'inactive' state.
(Restoring it isn't possible because the local instance has different blocks inside, which will get deleted.)
Manuel K
Manuel K 2022년 12월 1일
편집: Manuel K 2022년 12월 1일
Since the command only works the first time after placing the library-block (as mentioned in my comment above), my workaround is the following:
Everytime I need to change / update a setting inside the mask of the librry-block, I place a new instance and delete the old one.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Simulink Functions에 대해 자세히 알아보기

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by