필터 지우기
필터 지우기

How can i take screenshot of state flow and paste it in the word document?

조회 수: 2 (최근 30일)
Sowmyaa
Sowmyaa 2024년 3월 12일
댓글: Sowmyaa 2024년 3월 18일
How to take screen shot of state flow and paste it in the word document?
I tried the below codes, but it dint work for me
code1:
sfprint(gcs, 'meta');
Selection.Paste
code2:
print(gcs, '-dpng', 'stateflow_screenshot.png');
code3:
print(gcs, '-dmeta', 'stateflow_screenshot.emf');
Kindly guide me if there are any other method to take screen shot and place it in the word document.
Thank you.

답변 (1개)

Yash
Yash 2024년 3월 18일
Hi Sowmyaa,
You can export your Stateflow chart as an image using the code snippet below:
open_system("sf_model"); % open your stateflow model, replace sf_model with your model name
ch = find(sfroot,"-isa","Stateflow.Chart"); % access the Stateflow.Chart object for the chart
sfprint(ch,'jpg'); % export your chart as jpg
Refer here for more information on "Stateflow.Clipboard" and "sfprint":

카테고리

Help CenterFile Exchange에서 Stateflow에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by