Documentation

slreportgen.finder.DiagramElementResult class

Package: slreportgen.finder
Superclasses:

Create diagram element finder result object

Description

Diagram element search result object for an element in a Simulink® or Stateflow® diagram.

Construction

result = DiagramElementResult(elem) creates a search result object for a diagram element. The result object contains the specified Simulink or Stateflow diagram element.

Note

The find methods of diagram element finders create and return instances of this object. You do not need to create instances yourself.

finder = DiagramElementResult(Name,Value) sets properties using name-value pairs. You can specify multiple name-value pair arguments in any order. Enclose each property name in single quotes.

Input Arguments

expand all

Simulink or Stateflow diagram element, specified as a path or handle to the element.

Properties

expand all

This read-only property contains a handle to the diagram element returned in this result.

This read-only property specifies the name of the diagram element returned in this result.

This read-only property specifies the type of the diagram element returned in this result.

Example: "Simulink.BlockDiagram"

This read-only property returns the path of the diagrram that contains the element returned in this result.

Additional information to add to this result. You can set it to any type of value.

Methods

getReporter Get diagram element reporter

Copy Semantics

Handle. To learn how handle classes affect copy operations, see Copying Objects (MATLAB).

Examples

Create Diagram Element Result Object for Subsystem

Load the sf_car model and save the result of searching for diagram elements in its Engine subsystem. Both code examples produce the same result object. Use the second approach if you want to customize how the results display in your report.

import slreportgen.finder.*
load_system('sf_car')
result = DiagramElementResult('sf_car/Engine') 

% or

load_system('sf_car')
finder = DiagramElementFinder();
result = find(finder,'sf_car/Engine')
Include the result directly in an slreportgen.report.Report report or, add it to a reporter that you then add to the report.

Introduced in R2017b

Was this topic helpful?