How can I set the diagram view offset

2 views (last 30 days)
Robert
Robert on 21 Mar 2018
We have a script that normalises the appearance of Simulink models in accordance to our development rules. One part of it is to move all objects in a diagram in a way that the leftmost objects is placed with a decent margin to horizontal 0-position and the topmost respectively to vertical 0-Position. But in recent versions Simulink seems to save the view offset "as is" when saving. This often results in a blank window when re-opening, where the elements have been moved to their intended position and the view offset at saving time was somewhere way off the origin.
So is there any way to move the view offset to the origin by script? Or at least make Simulink not save the view offset to file, so it will reload without view offset? I couldn't find any parameter of Subsystem-objects to influence this, does anyone else know a solution?

Answers (0)

Categories

Find more on Programmatic Model Editing in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!