Simulink: Fit to View (Space) Programmatically
显示 更早的评论
Hi everyone,
I developed my own utility to handle my Simulink models and I would like to execute the Fit to View command (Space shortcut in Simulink) when opening the models programmatically. Is there a way to do that with a MATLAB command or using a Java Robot is the only way right now?
(In case someone is interested in implementing this with Java:)
% Create Java Robot
jRobot = java.awt.Robot;
% Fit Simulink to View with jRobot
jRobot.keyPress(java.awt.event.KeyEvent.VK_SPACE);
jRobot.keyRelease(java.awt.event.KeyEvent.VK_SPACE);
Thanks in advance.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Robotics 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!