필터 지우기
필터 지우기

Problem with RTF in DocBlocks

조회 수: 1 (최근 30일)
Voyt
Voyt 2013년 1월 18일
답변: Wojciech Przystas 2015년 3월 10일
Hello,
I'm using Matlab 2010a and I have a problem with the DocBlocks. I want to get programmatically the contents of the DocBlocks in a model. When the format is set to "Text" or "HTML" it's no problem using the command get(gcbh, 'UserData'). But with the RTF format, I get binary content as the format seems to be "RTF_ZIP" which is compressed RTF (apparentrly it's a feature introduced in 2010a). Is there any way to get the text of the RTF, without any operation by hand from the user ?
Thanks

답변 (1개)

Wojciech Przystas
Wojciech Przystas 2015년 3월 10일
Hi,
I had the same problem. I found two methods called " compressRTFData/uncompressRTFData " in the docblock.m file (matlabroot\toolbox\simulink\blocks\docblock.m). In case of the RTF_ZIP format you can simply pass the binary/compressed data from userdata.content to the uncompressRTFData function and get the uncompressed data, which can be directly interpreted as RTF.
I hope this helps.
Best wishes

카테고리

Help CenterFile Exchange에서 Reporting and Database Access에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by