Clear Filters
Clear Filters

How to select which blocks parameters description appear on the system design description report?

2 views (last 30 days)
Hi, I am trying to generate a report with only some blocks parameter description. I click on customize content, inside the report explorer. The problem is that inside the subsystem chapter there is a section 2 - Blocks which selects all the blocks inside each subsystem and prints you on the report. What I want is to select what blocks appear inside each subsystem on my report. I am not interested on all blocks but only in some blocks (maybe the most important). I attach an image of the Section 2 -Blocks. Can anyone help me? Thank you in advance :)

Accepted Answer

Eric
Eric on 14 Dec 2017
  1. Write a function, say myFilterFcn, to that it returns true for the blocks you want to report on.
  2. In your custom SDD report tempate, navigate to "Section 2 - Blocks" -> "Section 3 - Parameters" -> "Block Loop" -> If (StdRpt.SDD..."
  3. Update this IF condition expression string to include your function
StdRpt.SDD.includeBlock(RptgenSL.getReportedBlock()) && myFilterFcn(RptgenSL.getReportedBlock())
  1 Comment
Joseba Cantero
Joseba Cantero on 15 Dec 2017
Hi Eric, thank you for your help. It works well. I have created the following function which returns true if a block is a Gain block (in this case, but you could select the block type which you prefer).
function [output] = myFilterFcn(block)
%myFilterFcn This function returns true if the entering
%block is a gain type
b = string(get_param(block,'BlockType'));
if ( b == 'Gain')%you can select here the block Types you want.
output = true;
else
output = false;
end
Many thanks! :)

Sign in to comment.

More Answers (0)

Categories

Find more on Reporting and Database Access in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!