Programmatically Flip/Rotate Simulink Block

14 views (last 30 days)
Hi,
I'd like to programmatically rotate/flip a simulink block - arbitrarily. Unfortunately, the 'orientation' property
seems to support specific orientations, only. Thus, no combination of e.g. 'y-mirror' and 90° clockwise rotation
seems to be possible.
Certainly, Simulink supports that via the 'Format' menue but I did not find an accessible block property for this.
Is there a way to access the 'Format/Flip Block' menu of Simulink via Matlab? I did not find a matching property in the slx model, but maybe I overlooked a possibility. Also, I was not able to send key commands to Simulink.
Any suggestions?
Many thanks in advance!

Accepted Answer

Timo Dietz
Timo Dietz on 25 Jan 2023
Edited: Timo Dietz on 25 Jan 2023
I finally made it with the help of:
I activate Simulink, select the block to be manipulated and then send kesytrokes for rotating and flipping it.
Not he most elegant approach but it works for me.
Have a nice day!

More Answers (1)

Jean Matthieu
Jean Matthieu on 24 Jan 2023
Edited: Jean Matthieu on 24 Jan 2023
Hi
set_param(gcb, 'Orientation', 'left')
--> Other keywords are up, right, down
Is that what you're looking for?
  1 Comment
Timo Dietz
Timo Dietz on 24 Jan 2023
Thanks for your answer. Unfortunately, these orientation properties do not suffice since they do not cover all possible variations of rotating and mirroring.

Sign in to comment.

Categories

Find more on Simulink Functions in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!