get_param(​annotation​,'Text') has inconsistent format

I am trying to obtain the annotation texts from all of my subsystems in Simulink programmatically, and then edit them.
First, I tried to use set_param (annotation, 'PlainText', annotationtext) but it turns out that 'PlainText' is read-only.
Then, I started using get_param (annotation, 'Text') to obtain the text because 'Text' is not read-only, so I can edit that.
However, when i use get_param for 'Text', the text is sometimes obtained in html format for some subsystems, and sometimes in in plain format for other subsystems. Thus, I cannot create a generic script to edit the text because sometimes I get it in html format and sometimes in plain format. Why does this happen? How can I obtain all text in plain format by using the 'Text' property?

댓글 수: 1

Fi La
Fi La 2020년 12월 8일
I now found the answer, if I change the 'Interpreter' to 'off', I can obtain plain text.

댓글을 달려면 로그인하십시오.

 채택된 답변

Fi La
Fi La 2020년 12월 8일

0 개 추천

I now found the answer, if I change the 'Interpreter' to 'off', I can obtain plain text.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Programmatic Model Editing에 대해 자세히 알아보기

질문:

2020년 12월 8일

답변:

2020년 12월 8일

Community Treasure Hunt

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

Start Hunting!

Translated by