Filter löschen
Filter löschen

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

5 Ansichten (letzte 30 Tage)
Manuel K
Manuel K am 30 Nov. 2022
Bearbeitet: Manuel K am 1 Dez. 2022
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 Kommentare
Fangjun Jiang
Fangjun Jiang am 30 Nov. 2022
Sorry, to be acurate, for the library block, I shall refer it as "is the LinkStatus inactive".

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Fangjun Jiang
Fangjun Jiang am 30 Nov. 2022
I've tried it. You need to disable the library link first.
set_param(gcb,'LinkStatus','inactive')
Simulink.BlockDiagram.arrangeSystem(gcb,FullLayout='true')
  2 Kommentare
Manuel K
Manuel K am 1 Dez. 2022
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 am 1 Dez. 2022
Bearbeitet: Manuel K am 1 Dez. 2022
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.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Simulink Environment Customization finden Sie in Help Center und File Exchange

Produkte


Version

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by