Programmatically capturing screenshots of Simulink blocks and dialogs
88 views (last 30 days)
This is a shot in the dark, but does anyone know of a convenient built-in way to programmatically create screen captures of Simulink blocks and dialogs? This is for documentation purposes. We'd like to show an image of the block and the dialog in the documents but we don't want to manually screencap the block and dialog of upwards of a hundred blocks.
Greg on 10 Oct 2018
You can import java packages into MATLAB, one of them (java.awt.* ??) includes the ability to take screenshots. I'm assuming there's an open or edit equivalent to launch each block, then use the java to capture screen.
More Answers (2)
Fangjun Jiang on 1 Aug 2018
You might want to try Simulink "Web View". In the Simulink model, click menu File, Export model to, Web...
A html document is created. You can browse the hierarchy of the model just like in Simulink. Block dialog is not shown but block parameters are shown whenever you click a block. This is great for documentation purpose.
Alternatively, try menu File, Print, to a PDF file.