Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

mlreportgen.ppt.ProgressMessage.passesFilter

Package: mlreportgen.ppt

Determine if message passes filter

Syntax

tf = passesFilter(message,filter)

Description

example

tf = passesFilter(message,filter) determines whether the message passes the filter.

Examples

collapse all

This example shows how to add a progress message to display when generating a presentation.

Add a dispatcher and listener to the report. Configure the dispatcher to include debug messages.

import mlreportgen.ppt.*;
pre = Presentation('myPresentation.pptx');
     
dispatcher = MessageDispatcher.getTheDispatcher;
     dispatcher.Filter.DebugMessagesPass = true;
l = addlistener(dispatcher,'Message', ...
      @(src, evtdata) disp(evtdata.Message.formatAsText));

Create a progress message.

dispatch(dispatcher,ErrorMessage('invalid slide',pre));
open(pre);
     
titleText = Text('This is a Title');
titleText.Style = {Bold};

replace(pre,'Title',titleText);

Generate the presentation and delete the listener.

close(pre);
     
delete(l);

Check the progress messages in the MATLAB® Command Window. In addition to the predefined PPT progress messages, the starting chapter message added in this example appears. The output also includes debug messages.

Input Arguments

collapse all

PPT progress message, specified as an mlreportgen.ppt.ProgressMessage object.

Filter to use with the progress message, specified as an mlreportgen.ppt.MessageFilter object.

Output Arguments

collapse all

  • 1 — Messages passes the specified filter (the dispatcher handles the message)

  • 0 — Messages fails the specified filter (the dispatcher ignores the message)

Introduced in R2015b

Was this topic helpful?