How do I query the bounding box coordinates of my Simulink model's printout in Simulink 7.2 (R2008b)?

1 view (last 30 days)
I would like to be able to map Simulink coordinates to metafile coordinates. The bounding box coordinates of blocks in the produced EMF file map well to the Simulink coordinates as long as there is not a lot of white space around the blocks in the model or a block is located in the upper left corner of the model. Also, it appears that the EMF file has a bounding box much tighter around the blocks. I would like to know how to query the bounding box coordinates in Simulink.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
In order to obtain the bounding box coordinates of a Simulink model, one of the following features can be used:
1. Query the model property 'Systembounds':
get_param(gcs,'Systembounds')
2. Obtain the bounds using the SL_GET_GRAPH_VIEW_BOUNDS function:
sl_get_graph_view_bounds(get_param(gcs,'handle'))
Note that both features described here are undocumented, and may be subjected to change in future releases of MATLAB.

More Answers (0)

Categories

Find more on Modeling 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!