Text in From/GoTo flags (Constant blocks, ...) cannot be selected/marked in Simulink block diagram pdf vector graphic print outs in R2022b

2 views (last 30 days)
Hi all,
The task is to create a documentation with pictures of the block diagram. Every text snippet in the pictures shall be markable to copy/paste the text. This was working fine with R2015b and R2016b.
The project was moved to R2022b and the text in the From/GoTo flags or Constant blocks in the pdf print outs is not selectable anymore.
The commands for pictures are:
print('-s','-vector','R2022_Example','-dpdf') % R2022b
print('-s','-vector','R2022_Example','-dsvg') % R2022b
print('-s','R2016_Example','-dpdf') % R2016b
print('-s','R2016_Example','-dsvg') % R2016b
The question is: Is there a possiblity in R2022b (or later) that text in the From/GoTo flags is still selectable?
Text in the blocks of another blockset are still selectable.
Thanks a lot in advance!
BR
Michael
R2016b
R2022b

Answers (1)

Jaskirat
Jaskirat on 27 Jan 2025
Hello,
I understand that there is some issue with the text in the “Goto” and “From” blocks on converting the Simulink file to pdf.
A workaround is to use 'AttributesFormatString' to display the value under the block name. For example, use the following code for the “From” and “Goto” block to add value below it:
>>set_param(gcb,'AttributesFormatString','Value=%<GotoTag>');
Alternatively, you could also use the “Block Annotation” tab in the Block Properties dialog to do the same thing. Please refer to the documentation on the following link:
  1 Comment
Michael
Michael on 3 Feb 2025
Hi Jaskirat,
thanks for your help.
Unfortunately this workaround will not work for me: I have many "From" and "GoTo" flags positioned one below the other and there is no space for an annotation below.
I have reworked the export script which now relies on R2016b.
I would also like to mention that at least "Constant" blocks are also affected by this behaviour.

Sign in to comment.

Categories

Find more on Interactive Model Editing in Help Center and File Exchange

Products


Release

R2022b

Community Treasure Hunt

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

Start Hunting!