Programmatically capturing screenshots of Simulink blocks and dialogs
조회 수: 72 (최근 30일)
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 2018년 10월 10일
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.
추가 답변 (2개)
Fangjun Jiang 2018년 8월 1일
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.